Skip to content

Commit 82c223e

Browse files
committed
Remove bnd instructions from opcodes test
1 parent fe50532 commit 82c223e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

t/opcodes.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import "@defasm/core";
88
import { AssemblyState, getMnemonicList, fetchMnemonic } from "@defasm/core";
99
import { 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+
1116
function reverseObject(obj) {
1217
return Object.assign({}, ...Object.keys(obj).map(x => ({[obj[x]]: x})));
1318
}
@@ -244,14 +249,11 @@ function* generateInstrs(mnemonic, {
244249
test("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

Comments
 (0)