Merge remote-tracking branch 'origin/nasm-2.16.xx'

This commit is contained in:
H. Peter Anvin 2025-08-11 11:23:39 -07:00
commit 5457220e55
2 changed files with 44 additions and 19 deletions

View file

@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 2017 The NASM Authors - All Rights Reserved
* Copyright 2017-2025 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for
* the specific copyright holders.
*
@ -42,40 +42,64 @@
#include "nasmlib.h"
#include "error.h"
#if defined(__MSDOS__) || defined(__DOS__) || \
#define PATH_UNKNOWN 0
#define PATH_UNIX 1
#define PATH_MSDOS 2
#define PATH_MACCLASSIC 3
#define PATH_VMS 4
#ifdef PATHSTYLE
/* PATHSTYLE set externally, hope it is correct */
#elif defined(__MSDOS__) || defined(__DOS__) || \
defined(__WINDOWS__) || defined(_Windows) || \
defined(__OS2__) || defined(_WIN16) || defined(WIN32) || defined(_WIN32)
/* MS-DOS/Windows and like operating systems */
# define separators "/\\:"
# define cleandirend "/\\"
# define catsep '\\'
# define leaveonclean 2 /* Leave \\ at the start alone */
# define curdir "."
/*
* MS-DOS, Windows and like operating systems
*/
# define PATHSTYLE PATH_MSDOS
#elif defined(unix) || defined(__unix) || defined(__unix__) || \
defined(__UNIX__) || defined(__Unix__) || \
defined(__MACH__) || defined(__BEOS__)
/* Unix and Unix-like operating systems and others using
defined(_POSIX_VERSION) || defined(_XOPEN_VERSION) || \
defined(__MACH__) || defined(__BEOS__) || defined(__HAIKU__)
/*
* Unix and Unix-like operating systems and others using
* the equivalent syntax (slashes as only separators, no concept of volume)
*
* This must come after the __MSDOS__ section, since it seems that at
* least DJGPP defines __unix__ despite not being a Unix environment at all.
*/
# define PATHSTYLE PATH_UNIX
#elif defined(Macintosh) || defined(macintosh)
# define PATHSTYLE PATH_MACCLASSIC
#elif defined(__VMS)
/* VMS (only partially supported, really) */
# define PATHSTYLE PATH_VMS
#else
/* Something else entirely? */
# define PATHSTYLE PATH_UNKNOWN
#endif
#if PATHSTYLE == PATH_MSDOS
# define separators "/\\:"
# define cleandirend "/\\"
# define catsep '\\'
# define leaveonclean 2 /* Leave \\ at the start alone */
# define curdir "."
#elif PATHSTYLE == PATH_UNIX
# define separators "/"
# define cleandirend "/"
# define catsep '/'
# define leaveonclean 1
# define curdir "."
#elif defined(Macintosh) || defined(macintosh)
/* MacOS classic */
#elif PATHSTYLE == PATH_MACCLASSIC
# define separators ":"
# define curdir ":"
# define catsep ':'
# define cleandirend ":"
# define leaveonclean 0
# define leave_leading 1
#elif defined(__VMS)
/* VMS *
*
#elif PATHSTYLE == PATH_VMS
/*
* VMS filenames may have ;version at the end. Assume we should count that
* as part of the filename anyway.
*/

View file

@ -1,6 +1,6 @@
;; --------------------------------------------------------------------------
;;
;; Copyright 1996-2024 The NASM Authors - All Rights Reserved
;; Copyright 1996-2025 The NASM Authors - All Rights Reserved
;; See the file AUTHORS included with the NASM distribution for
;; the specific copyright holders.
;;
@ -1193,7 +1193,7 @@ SAL rm32,imm8 [mi: o32 c1 /4 ib,u] 386,ND
SAL rm64,unity [m-: o64 d1 /4] X86_64,LONG,ND
SAL rm64,reg_cl [m-: o64 d3 /4] X86_64,LONG,ND
SAL rm64,imm8 [mi: o64 c1 /4 ib,u] X86_64,LONG,ND
SALC void [ d6] 8086,UNDOC
SALC void [ d6] 8086,NOLONG,UNDOC
SAR rm8,unity [m-: d0 /7] 8086
SAR rm8,reg_cl [m-: d2 /7] 8086
SAR rm8,imm8 [mi: c0 /7 ib,u] 186
@ -1398,20 +1398,21 @@ TEST rm64,imm [mi: o64 f7 /0 id,s] X86_64,LONG,SM
TEST mem,imm8 [mi: f6 /0 ib] 8086,SM
TEST mem,imm16 [mi: o16 f7 /0 iw] 8086,SM
TEST mem,imm32 [mi: o32 f7 /0 id] 386,SM
UD0 void [ 0f ff] 186,OBSOLETE
UD0 reg16,rm16 [rm: o16 0f ff /r] 186
UD0 reg32,rm32 [rm: o32 0f ff /r] 186
UD0 reg64,rm64 [rm: o64 0f ff /r] 186
UD0 void [ 0f ff] 186,ND
UD1 reg16,rm16 [rm: o16 0f b9 /r] 186
UD1 reg32,rm32 [rm: o32 0f b9 /r] 186
UD1 reg64,rm64 [rm: o64 0f b9 /r] 186
UD1 void [ 0f b9] 186,ND
UD2B void [ 0f b9] 186,ND
UD2B reg16,rm16 [rm: o16 0f b9 /r] 186,ND
UD2B reg32,rm32 [rm: o32 0f b9 /r] 186,ND
UD2B reg64,rm64 [rm: o64 0f b9 /r] 186,ND
UD2B void [ 0f b9] 186,ND
UD2 void [ 0f 0b] 186
UD2A void [ 0f 0b] 186,ND
UDB void [ d6] X86_64,LONG
UMOV mem,reg8 [mr: np 0f 10 /r] 386,UNDOC,SM,ND
UMOV reg8,reg8 [mr: np 0f 10 /r] 386,UNDOC,ND
UMOV mem,reg16 [mr: np o16 0f 11 /r] 386,UNDOC,SM,ND