Skip to content

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Aug 3, 2020
1 parent 0e64eb6 commit d6bd8c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libdec/arch/x86.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,17 +722,17 @@
krnl32: [ /* */ , /* */ , /* */ , /**/ 'r10d', /* */ , /* */ ],
};
return _populate_generic_amd64_call_args(instrs, nargs, context, regs);
}
};

var _populate_ms_amd64_call_args = function(instrs, nargs, context) {
var regs = {
regs64: [ /**/ 'rcx', /**/ 'rdx', /* */ 'r8', /* */ 'r9'],
regs32: [ /**/ 'eax', /**/ 'ecx', /**/ 'edx'],
krnl64: [ /**/ 'rcx', /**/ 'rdx', /* */ 'r8', /* */ 'r9'],
krnl32: [ /**/ 'eax', /**/ 'ecx', /**/ 'edx'],
krnl64: [],
krnl32: [],
};
return _populate_generic_amd64_call_args(instrs, nargs, context, regs);
}
};

var _call_function = function(instr, context, instrs, is_pointer, cannot_return) {
var call, start = instrs.indexOf(instr);
Expand Down Expand Up @@ -947,14 +947,14 @@
callee = _populate_cdecl_call_args;
if (nargs == -1) {
nargs = _guess_amd64_nargs(instrs.slice(0, start), context);
callee = _populate_amd64_call_args;
callee = _populate_systemv_amd64_call_args;
}

if (callee && nargs > -1) {
args = callee(instrs.slice(0, start), nargs, context);
}
} else {
args = _populate_amd64_call_args(instrs.slice(0, start), nargs, context);
args = _populate_systemv_amd64_call_args(instrs.slice(0, start), nargs, context);
if (args.length < 1 && nargs > 0) {
_populate_cdecl_call_args(instrs.slice(0, start), nargs, context);
}
Expand Down

0 comments on commit d6bd8c0

Please sign in to comment.