py/{asmx86,asmx64}: Extend test_r8_with_r8 to accept all 8 lower regs.

This commit is contained in:
Damien George 2018-09-14 17:38:09 +10:00
parent dd522d63b6
commit abb536da49
2 changed files with 2 additions and 6 deletions

View File

@ -467,9 +467,8 @@ void asm_x64_cmp_i32_with_r32(asm_x64_t *as, int src_i32, int src_r32) {
*/
void asm_x64_test_r8_with_r8(asm_x64_t *as, int src_r64_a, int src_r64_b) {
// TODO implement for other registers
assert(src_r64_a == ASM_X64_REG_RAX);
assert(src_r64_b == ASM_X64_REG_RAX);
assert(src_r64_a < 8);
assert(src_r64_b < 8);
asm_x64_write_byte_2(as, OPCODE_TEST_R8_WITH_RM8, MODRM_R64(src_r64_a) | MODRM_RM_REG | MODRM_RM_R64(src_r64_b));
}

View File

@ -330,9 +330,6 @@ void asm_x86_cmp_i32_with_r32(asm_x86_t *as, int src_i32, int src_r32) {
#endif
void asm_x86_test_r8_with_r8(asm_x86_t *as, int src_r32_a, int src_r32_b) {
// TODO implement for other registers
assert(src_r32_a == ASM_X86_REG_EAX);
assert(src_r32_b == ASM_X86_REG_EAX);
asm_x86_write_byte_2(as, OPCODE_TEST_R8_WITH_RM8, MODRM_R32(src_r32_a) | MODRM_RM_REG | MODRM_RM_R32(src_r32_b));
}