Skip to content

Commit

Permalink
Merge pull request #4324 from 0dvictor/unresolved64
Browse files Browse the repository at this point in the history
Respect resolving static method low-tag on X86-64
  • Loading branch information
andrewcraik committed Jan 17, 2019
2 parents 6b6c2c8 + b4d4319 commit c1d6f09
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions runtime/compiler/x/runtime/X86Unresolveds.nasm
Original file line number Diff line number Diff line change
Expand Up @@ -1231,18 +1231,22 @@ interpreterUnresolvedStaticGlue:
push rsi ; The RET will mispredict anyway so we can get away with pushing
; the adjusted RA back on the stack.

; The interpreter may low-tag the result to avoid populating the constant pool--whack it.
; The interpreter may low-tag the result to avoid populating the constant pool -- whack it and record in CF.
;
and rax, -2
btr rax, 0

; Load the resolved RAM method into RDI so that the caller doesn't have to re-run patched code
mov rdi, rax

; Skip code patching if the interpreter low-tag the RAM mathod
jc .fin

; Patch the call that brought us here into a load of the resolved RAM method into RDI.
;
shl rax, 16
xor rax, 0bf48h ; REX+MOV bytes
mov qword [rsi-10], rax
.fin:
ret


Expand Down

0 comments on commit c1d6f09

Please sign in to comment.