8323503: x86: Shorter movptr(reg, imm) for 32-bit unsigned immediates
Reviewed-by: stuefe, kvn, eastigeevich
This commit is contained in:
parent
84deeb6cd5
commit
e999dfcb40
@ -2568,7 +2568,9 @@ void MacroAssembler::movptr(Register dst, Address src) {
|
||||
// src should NEVER be a real pointer. Use AddressLiteral for true pointers
|
||||
void MacroAssembler::movptr(Register dst, intptr_t src) {
|
||||
#ifdef _LP64
|
||||
if (is_simm32(src)) {
|
||||
if (is_uimm32(src)) {
|
||||
movl(dst, checked_cast<uint32_t>(src));
|
||||
} else if (is_simm32(src)) {
|
||||
movq(dst, checked_cast<int32_t>(src));
|
||||
} else {
|
||||
mov64(dst, src);
|
||||
|
@ -359,6 +359,7 @@ class AbstractAssembler : public ResourceObj {
|
||||
}
|
||||
|
||||
static bool is_uimm12(uint64_t x) { return is_uimm(x, 12); }
|
||||
static bool is_uimm32(uint64_t x) { return is_uimm(x, 32); }
|
||||
|
||||
// Accessors
|
||||
CodeSection* code_section() const { return _code_section; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user