|
@@ -494,6 +494,7 @@ interface
|
|
|
function is_64_bit_ref(const ref:treference):boolean;
|
|
|
function is_32_bit_ref(const ref:treference):boolean;
|
|
|
function is_16_bit_ref(const ref:treference):boolean;
|
|
|
+ function get_ref_address_size(const ref:treference):byte;
|
|
|
|
|
|
function spilling_create_load(const ref:treference;r:tregister):Taicpu;
|
|
|
function spilling_create_store(r:tregister; const ref:treference):Taicpu;
|
|
@@ -1835,6 +1836,19 @@ implementation
|
|
|
end;
|
|
|
|
|
|
|
|
|
+ function get_ref_address_size(const ref:treference):byte;
|
|
|
+ begin
|
|
|
+ if is_64_bit_ref(ref) then
|
|
|
+ result:=64
|
|
|
+ else if is_32_bit_ref(ref) then
|
|
|
+ result:=32
|
|
|
+ else if is_16_bit_ref(ref) then
|
|
|
+ result:=16
|
|
|
+ else
|
|
|
+ internalerror(2017101601);
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
function taicpu.needaddrprefix(opidx:byte):boolean;
|
|
|
begin
|
|
|
{$if defined(x86_64)}
|