Revert^2 "Revert^2 "X86: VarHandle.Get() intrinsic for static primitive fields.""
This reverts commit 0e5e1772fb6ed3dcbd1cdaf09e3c8cd2020091d5.
Reason for revert: Relanding the change. It was reverted because it
seemed to be the source of a test failure, but it turned out to be a
known flaky test (Bug: 147572335).
Change-Id: I572d2d1951b0909641a73df0b3ef2fd453f62d8b
diff --git a/compiler/optimizing/code_generator_x86.h b/compiler/optimizing/code_generator_x86.h
index d2f1e77..ce25849 100644
--- a/compiler/optimizing/code_generator_x86.h
+++ b/compiler/optimizing/code_generator_x86.h
@@ -232,6 +232,17 @@
// generates less code/data with a small num_entries.
static constexpr uint32_t kPackedSwitchJumpTableThreshold = 5;
+ // Generate a GC root reference load:
+ //
+ // root <- *address
+ //
+ // while honoring read barriers based on read_barrier_option.
+ void GenerateGcRootFieldLoad(HInstruction* instruction,
+ Location root,
+ const Address& address,
+ Label* fixup_label,
+ ReadBarrierOption read_barrier_option);
+
private:
// Generate code for the given suspend check. If not null, `successor`
// is the block to branch to if the suspend check is not needed, and after
@@ -292,16 +303,6 @@
Location obj,
uint32_t offset,
ReadBarrierOption read_barrier_option);
- // Generate a GC root reference load:
- //
- // root <- *address
- //
- // while honoring read barriers based on read_barrier_option.
- void GenerateGcRootFieldLoad(HInstruction* instruction,
- Location root,
- const Address& address,
- Label* fixup_label,
- ReadBarrierOption read_barrier_option);
// Push value to FPU stack. `is_fp` specifies whether the value is floating point or not.
// `is_wide` specifies whether it is long/double or not.
@@ -433,6 +434,13 @@
void Move32(Location destination, Location source);
// Helper method to move a 64bits value between two locations.
void Move64(Location destination, Location source);
+ // Helper method to move a value from an address to a register.
+ void MoveFromMemory(DataType::Type dst_type,
+ Location dst,
+ Register src_base,
+ Register src_index = Register::kNoRegister,
+ ScaleFactor src_scale = TIMES_1,
+ int32_t src_disp = 0);
// Check if the desired_string_load_kind is supported. If it is, return it,
// otherwise return a fall-back kind that should be used instead.