@@ -8,6 +8,11 @@ import "@defasm/core";
88import { AssemblyState , getMnemonicList , fetchMnemonic } from "@defasm/core" ;
99import { OPT , registers , suffixes , floatSuffixes , floatIntSuffixes } from "@defasm/core/operands.js" ;
1010
11+ const EXCLUDED_MNEMONICS = [
12+ 'sysexitl' , 'sysexitq' , 'int1' , 'movsx' , 'movsxd' , 'movzx' ,
13+ 'bndcl' , 'bndcn' , 'bndcu' , 'bndldx' , 'bndmk' , 'bndmov' , 'bndstx'
14+ ] ;
15+
1116function reverseObject ( obj ) {
1217 return Object . assign ( { } , ...Object . keys ( obj ) . map ( x => ( { [ obj [ x ] ] : x } ) ) ) ;
1318}
@@ -244,14 +249,11 @@ function* generateInstrs(mnemonic, {
244249test ( "All opcodes test" , { skip : process . platform != 'linux' } , async ( ) => {
245250 const mnemonics = process . argv . slice ( 3 ) ;
246251
247- // These are mnemonics that defasm assembles correctly, but GAS doesn't, for some reason
248- const uncheckedMnemonics = [ 'sysexitl' , 'sysexitq' , 'int1' , 'movsx' , 'movsxd' , 'movzx' ] ;
249-
250252 let source = "" ;
251253
252254 const mnemonicList = mnemonics . length > 0 ? mnemonics : getMnemonicList ( ) ;
253255 for ( const mnemonic of mnemonicList ) {
254- if ( uncheckedMnemonics . includes ( mnemonic ) )
256+ if ( EXCLUDED_MNEMONICS . includes ( mnemonic ) )
255257 continue ;
256258 for ( const line of generateInstrs ( mnemonic ) )
257259 source += line + '\n' ;
0 commit comments