allwinner_a64/android/art/runtime/interpreter/mterp/x86_64/unop.S
2018-08-08 16:48:17 +08:00

22 lines
668 B
ArmAsm

%default {"preinstr":"", "instr":"", "wide":"0"}
/*
* Generic 32/64-bit unary operation. Provide an "instr" line that
* specifies an instruction that performs "result = op eax".
*/
/* unop vA, vB */
movl rINST, %ecx # rcx <- A+
sarl $$4,rINST # rINST <- B
.if ${wide}
GET_WIDE_VREG %rax, rINSTq # rax <- vB
.else
GET_VREG %eax, rINSTq # eax <- vB
.endif
andb $$0xf,%cl # ecx <- A
$preinstr
$instr
.if ${wide}
SET_WIDE_VREG %rax, %rcx
.else
SET_VREG %eax, %rcx
.endif
ADVANCE_PC_FETCH_AND_GOTO_NEXT 1