Add tests and documentation for x86_(push|pop). Fix up encoding issues revealed by tests.

This commit is contained in:
Tyler McMullen
2017-12-01 19:15:31 -08:00
committed by Jakob Stoklund Olesen
parent 3b1b33e0ac
commit 1a11c351b5
4 changed files with 38 additions and 5 deletions

View File

@@ -228,8 +228,11 @@ enc_both(base.fill.b1, r.fiSib32, 0x8b)
enc_both(base.regfill.b1, r.rfi32, 0x8b)
# Push and Pop
enc_i32_i64(x86.push, r.pushq, 0x50)
enc_i32_i64(x86.pop, r.popq, 0x58)
I32.enc(x86.push.i32, *r.pushq(0x50))
enc_i64(x86.push.i64, r.pushq, 0x50)
I32.enc(x86.pop.i32, *r.popq(0x58))
enc_i64(x86.pop.i64, r.popq, 0x58)
# Copy Special
I64.enc(base.copy_special, *r.copysp.rex(0x89, w=1))