diff --git a/src/x86.md b/src/x86.md index 422a7438..2999d420 100755 --- a/src/x86.md +++ b/src/x86.md @@ -576,11 +576,14 @@ reg: CALLI4(addrj) "call %0\nadd esp,%a\n" reg: CALLU4(addrj) "call %0\nadd esp,%a\n" reg: CALLP4(addrj) "call %0\nadd esp,%a\n" stmt: CALLV(addrj) "call %0\nadd esp,%a\n" -reg: CALLF4(addrj) "call %0\nadd esp,%a\n" -reg: CALLF8(addrj) "call %0\nadd esp,%a\n" + stmt: CALLF4(addrj) "call %0\nadd esp,%a\nfstp\n" stmt: CALLF8(addrj) "call %0\nadd esp,%a\nfstp\n" +reg: CALLF4(addrj) "call %0\nadd esp,%a\n" +reg: CALLF8(addrj) "call %0\nadd esp,%a\n" + + stmt: RETI4(reg) "# ret\n" stmt: RETU4(reg) "# ret\n" stmt: RETP4(reg) "# ret\n" diff --git a/src/x86linux.md b/src/x86linux.md index 5546362f..5b448601 100755 --- a/src/x86linux.md +++ b/src/x86linux.md @@ -664,17 +664,18 @@ stmt: CALLV(addrj) "call %0\naddl $%a-4,%%esp\n" hasargs(a) + !isstruct(f stmt: CALLV(addrj) "call %0\naddl $%a,%%esp\n" hasargs(a) + isstruct(freturn(a->syms[1]->type)) stmt: CALLV(addrj) "call %0\n" 1 -freg: CALLF4(addrj) "call %0\naddl $%a,%%esp\n" hasargs(a) -freg: CALLF4(addrj) "call %0\n" 1 - stmt: CALLF4(addrj) "call %0\naddl $%a,%%esp\nfstp %%st(0)\n" hasargs(a) stmt: CALLF4(addrj) "call %0\nfstp %%st(0)\n" 1 +stmt: CALLF8(addrj) "call %0\naddl $%a,%%esp\nfstp %%st(0)\n" hasargs(a) +stmt: CALLF8(addrj) "call %0\nfstp %%st(0)\n" 1 + +freg: CALLF4(addrj) "call %0\naddl $%a,%%esp\n" hasargs(a) +freg: CALLF4(addrj) "call %0\n" 1 + freg: CALLF8(addrj) "call %0\naddl $%a,%%esp\n" hasargs(a) freg: CALLF8(addrj) "call %0\n" 1 -stmt: CALLF8(addrj) "call %0\naddl $%a,%%esp\nfstp %%st(0)\n" hasargs(a) -stmt: CALLF8(addrj) "call %0\nfstp %%st(0)\n" 1 stmt: RETI4(reg) "# ret\n" stmt: RETU4(reg) "# ret\n"