mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 06:19:32 +02:00
+ int register in treference.segment support in tcg8086.op_*ref*
git-svn-id: trunk@24586 -
This commit is contained in:
parent
2ec15deaba
commit
3aeea835f9
@ -274,6 +274,13 @@ unit cgcpu;
|
||||
tmpref:=ref;
|
||||
make_simple_ref(list,tmpref);
|
||||
|
||||
if (tmpref.segment<>NR_NO) and (not is_segment_reg(tmpref.segment)) then
|
||||
begin
|
||||
list.concat(taicpu.op_reg(A_PUSH,S_W,tmpref.segment));
|
||||
list.concat(taicpu.op_reg(A_POP,S_L,NR_ES));
|
||||
tmpref.segment:=NR_ES;
|
||||
end;
|
||||
|
||||
if size in [OS_64, OS_S64] then
|
||||
internalerror(2013050801);
|
||||
if size in [OS_32, OS_S32] then
|
||||
@ -419,6 +426,13 @@ unit cgcpu;
|
||||
make_simple_ref(list,tmpref);
|
||||
check_register_size(size,reg);
|
||||
|
||||
if (tmpref.segment<>NR_NO) and (not is_segment_reg(tmpref.segment)) then
|
||||
begin
|
||||
list.concat(taicpu.op_reg(A_PUSH,S_W,tmpref.segment));
|
||||
list.concat(taicpu.op_reg(A_POP,S_L,NR_ES));
|
||||
tmpref.segment:=NR_ES;
|
||||
end;
|
||||
|
||||
if size in [OS_64, OS_S64] then
|
||||
internalerror(2013030902);
|
||||
|
||||
@ -450,6 +464,13 @@ unit cgcpu;
|
||||
make_simple_ref(list,tmpref);
|
||||
check_register_size(size,reg);
|
||||
|
||||
if (tmpref.segment<>NR_NO) and (not is_segment_reg(tmpref.segment)) then
|
||||
begin
|
||||
list.concat(taicpu.op_reg(A_PUSH,S_W,tmpref.segment));
|
||||
list.concat(taicpu.op_reg(A_POP,S_L,NR_ES));
|
||||
tmpref.segment:=NR_ES;
|
||||
end;
|
||||
|
||||
if size in [OS_64, OS_S64] then
|
||||
internalerror(2013050803);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user