blob: e503ec1f3858a01b6e82a1c589cbc9b9a301bf84 [file] [log] [blame]
/*
* Generic one-operand compare-and-branch operation. Provide a "revcmp"
* fragment that specifies the *reverse* comparison to perform, e.g.
* for "if-le" you would use "gt".
*
* for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
*/
/* if-cmp vAA, +BBBB */
cmpl $$0, VREG_ADDRESS(rINSTq) # compare (vA, 0)
movl $$2, %eax # assume branch not taken
j${revcmp} 1f
movswq 2(rPC),%rax # fetch signed displacement
1:
addq %rax, %rax # eax <- AA * 2
leaq (rPC, %rax), rPC
FETCH_INST
jg 2f # AA * 2 > 0 => no suspend check
#if MTERP_SUSPEND
REFRESH_IBASE
#else
jmp MterpCheckSuspendAndContinue
#endif
2:
GOTO_NEXT