From 5f66f5cebb53a04c7533bb11750c1d4e13fe7961 Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 25 Apr 2017 16:10:43 +0000 Subject: [PATCH] + distinguish between x86 flags subregisters: flags, eflags and rflags git-svn-id: trunk@35953 - --- compiler/i386/r386ari.inc | 15 +++++----- compiler/i386/r386att.inc | 1 + compiler/i386/r386con.inc | 3 +- compiler/i386/r386dwrf.inc | 1 + compiler/i386/r386int.inc | 1 + compiler/i386/r386iri.inc | 17 +++++------ compiler/i386/r386nasm.inc | 1 + compiler/i386/r386nor.inc | 2 +- compiler/i386/r386nri.inc | 17 +++++------ compiler/i386/r386num.inc | 3 +- compiler/i386/r386ot.inc | 1 + compiler/i386/r386rni.inc | 9 +++--- compiler/i386/r386sri.inc | 17 +++++------ compiler/i386/r386stab.inc | 1 + compiler/i386/r386std.inc | 1 + compiler/i8086/r8086ari.inc | 15 +++++----- compiler/i8086/r8086att.inc | 1 + compiler/i8086/r8086con.inc | 3 +- compiler/i8086/r8086dwrf.inc | 1 + compiler/i8086/r8086int.inc | 1 + compiler/i8086/r8086iri.inc | 17 +++++------ compiler/i8086/r8086nasm.inc | 1 + compiler/i8086/r8086nor.inc | 2 +- compiler/i8086/r8086nri.inc | 17 +++++------ compiler/i8086/r8086num.inc | 3 +- compiler/i8086/r8086ot.inc | 1 + compiler/i8086/r8086rni.inc | 9 +++--- compiler/i8086/r8086sri.inc | 17 +++++------ compiler/i8086/r8086stab.inc | 1 + compiler/i8086/r8086std.inc | 1 + compiler/x86/cpubase.pas | 16 ++++++++++- compiler/x86/rax86int.pas | 2 +- compiler/x86/x86reg.dat | 4 ++- compiler/x86_64/r8664ari.inc | 52 +++++++++++++++++---------------- compiler/x86_64/r8664att.inc | 2 ++ compiler/x86_64/r8664con.inc | 4 ++- compiler/x86_64/r8664dwrf.inc | 2 ++ compiler/x86_64/r8664int.inc | 2 ++ compiler/x86_64/r8664iri.inc | 54 ++++++++++++++++++----------------- compiler/x86_64/r8664nasm.inc | 2 ++ compiler/x86_64/r8664nor.inc | 2 +- compiler/x86_64/r8664num.inc | 4 ++- compiler/x86_64/r8664ot.inc | 2 ++ compiler/x86_64/r8664rni.inc | 14 +++++---- compiler/x86_64/r8664sri.inc | 54 ++++++++++++++++++----------------- compiler/x86_64/r8664stab.inc | 2 ++ compiler/x86_64/r8664std.inc | 2 ++ 47 files changed, 235 insertions(+), 165 deletions(-) diff --git a/compiler/i386/r386ari.inc b/compiler/i386/r386ari.inc index c1f1d23220..570b5a3fc2 100644 --- a/compiler/i386/r386ari.inc +++ b/compiler/i386/r386ari.inc @@ -8,21 +8,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -32,13 +32,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -46,11 +46,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -58,12 +58,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 78, 79, 80, +81, 0 diff --git a/compiler/i386/r386att.inc b/compiler/i386/r386att.inc index b0bd5e217a..9dd873ce23 100644 --- a/compiler/i386/r386att.inc +++ b/compiler/i386/r386att.inc @@ -31,6 +31,7 @@ '%fs', '%gs', '%flags', +'%eflags', '%eip', '%dr0', '%dr1', diff --git a/compiler/i386/r386con.inc b/compiler/i386/r386con.inc index 1cf7c095d6..c010a75f3f 100644 --- a/compiler/i386/r386con.inc +++ b/compiler/i386/r386con.inc @@ -30,7 +30,8 @@ NR_SS = tregister($05000002); NR_DS = tregister($05000003); NR_FS = tregister($05000004); NR_GS = tregister($05000005); -NR_FLAGS = tregister($05000006); +NR_FLAGS = tregister($05030006); +NR_EFLAGS = tregister($05040006); NR_EIP = tregister($05040007); NR_DR0 = tregister($05000008); NR_DR1 = tregister($05000009); diff --git a/compiler/i386/r386dwrf.inc b/compiler/i386/r386dwrf.inc index bcfd060661..49112d1029 100644 --- a/compiler/i386/r386dwrf.inc +++ b/compiler/i386/r386dwrf.inc @@ -31,6 +31,7 @@ -1, -1, -1, +-1, 8, -1, -1, diff --git a/compiler/i386/r386int.inc b/compiler/i386/r386int.inc index 3dbec0852c..46b009753d 100644 --- a/compiler/i386/r386int.inc +++ b/compiler/i386/r386int.inc @@ -31,6 +31,7 @@ 'fs', 'gs', 'flags', +'eflags', 'eip', 'dr0', 'dr1', diff --git a/compiler/i386/r386iri.inc b/compiler/i386/r386iri.inc index 56d4e075ae..a6771fe29f 100644 --- a/compiler/i386/r386iri.inc +++ b/compiler/i386/r386iri.inc @@ -9,21 +9,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -33,13 +33,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -47,11 +47,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -59,12 +59,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 77, 78, 79, -80 +80, +81 diff --git a/compiler/i386/r386nasm.inc b/compiler/i386/r386nasm.inc index 40018df5cb..d3f43e9c13 100644 --- a/compiler/i386/r386nasm.inc +++ b/compiler/i386/r386nasm.inc @@ -31,6 +31,7 @@ 'fs', 'gs', 'flags', +'eflags', 'eip', 'dr0', 'dr1', diff --git a/compiler/i386/r386nor.inc b/compiler/i386/r386nor.inc index b4d5de5c03..e26ada03f3 100644 --- a/compiler/i386/r386nor.inc +++ b/compiler/i386/r386nor.inc @@ -1,2 +1,2 @@ { don't edit, this file is generated from x86reg.dat } -81 +82 diff --git a/compiler/i386/r386nri.inc b/compiler/i386/r386nri.inc index 56d4e075ae..a6771fe29f 100644 --- a/compiler/i386/r386nri.inc +++ b/compiler/i386/r386nri.inc @@ -9,21 +9,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -33,13 +33,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -47,11 +47,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -59,12 +59,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 77, 78, 79, -80 +80, +81 diff --git a/compiler/i386/r386num.inc b/compiler/i386/r386num.inc index c73b17c9ce..e04e047ad3 100644 --- a/compiler/i386/r386num.inc +++ b/compiler/i386/r386num.inc @@ -30,7 +30,8 @@ tregister($05000002), tregister($05000003), tregister($05000004), tregister($05000005), -tregister($05000006), +tregister($05030006), +tregister($05040006), tregister($05040007), tregister($05000008), tregister($05000009), diff --git a/compiler/i386/r386ot.inc b/compiler/i386/r386ot.inc index ebb569ca61..a46eb7c504 100644 --- a/compiler/i386/r386ot.inc +++ b/compiler/i386/r386ot.inc @@ -32,6 +32,7 @@ OT_REG_FSGS, OT_REG_FSGS, OT_NONE, OT_NONE, +OT_NONE, OT_REG_DREG, OT_REG_DREG, OT_REG_DREG, diff --git a/compiler/i386/r386rni.inc b/compiler/i386/r386rni.inc index acf306aa50..52f3d8d9b6 100644 --- a/compiler/i386/r386rni.inc +++ b/compiler/i386/r386rni.inc @@ -24,7 +24,6 @@ 20, 22, 24, -48, 49, 50, 51, @@ -57,14 +56,13 @@ 78, 79, 80, +81, 25, 26, 27, 28, 29, 30, -31, -33, 34, 35, 36, @@ -79,4 +77,7 @@ 45, 46, 47, -32 +48, +31, +32, +33 diff --git a/compiler/i386/r386sri.inc b/compiler/i386/r386sri.inc index 56d4e075ae..a6771fe29f 100644 --- a/compiler/i386/r386sri.inc +++ b/compiler/i386/r386sri.inc @@ -9,21 +9,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -33,13 +33,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -47,11 +47,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -59,12 +59,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 77, 78, 79, -80 +80, +81 diff --git a/compiler/i386/r386stab.inc b/compiler/i386/r386stab.inc index 4011a98e70..d577d7357a 100644 --- a/compiler/i386/r386stab.inc +++ b/compiler/i386/r386stab.inc @@ -47,6 +47,7 @@ -1, -1, -1, +-1, 12, 13, 14, diff --git a/compiler/i386/r386std.inc b/compiler/i386/r386std.inc index 3dbec0852c..46b009753d 100644 --- a/compiler/i386/r386std.inc +++ b/compiler/i386/r386std.inc @@ -31,6 +31,7 @@ 'fs', 'gs', 'flags', +'eflags', 'eip', 'dr0', 'dr1', diff --git a/compiler/i8086/r8086ari.inc b/compiler/i8086/r8086ari.inc index c1f1d23220..570b5a3fc2 100644 --- a/compiler/i8086/r8086ari.inc +++ b/compiler/i8086/r8086ari.inc @@ -8,21 +8,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -32,13 +32,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -46,11 +46,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -58,12 +58,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 78, 79, 80, +81, 0 diff --git a/compiler/i8086/r8086att.inc b/compiler/i8086/r8086att.inc index b0bd5e217a..9dd873ce23 100644 --- a/compiler/i8086/r8086att.inc +++ b/compiler/i8086/r8086att.inc @@ -31,6 +31,7 @@ '%fs', '%gs', '%flags', +'%eflags', '%eip', '%dr0', '%dr1', diff --git a/compiler/i8086/r8086con.inc b/compiler/i8086/r8086con.inc index 1cf7c095d6..c010a75f3f 100644 --- a/compiler/i8086/r8086con.inc +++ b/compiler/i8086/r8086con.inc @@ -30,7 +30,8 @@ NR_SS = tregister($05000002); NR_DS = tregister($05000003); NR_FS = tregister($05000004); NR_GS = tregister($05000005); -NR_FLAGS = tregister($05000006); +NR_FLAGS = tregister($05030006); +NR_EFLAGS = tregister($05040006); NR_EIP = tregister($05040007); NR_DR0 = tregister($05000008); NR_DR1 = tregister($05000009); diff --git a/compiler/i8086/r8086dwrf.inc b/compiler/i8086/r8086dwrf.inc index bcfd060661..49112d1029 100644 --- a/compiler/i8086/r8086dwrf.inc +++ b/compiler/i8086/r8086dwrf.inc @@ -31,6 +31,7 @@ -1, -1, -1, +-1, 8, -1, -1, diff --git a/compiler/i8086/r8086int.inc b/compiler/i8086/r8086int.inc index 3dbec0852c..46b009753d 100644 --- a/compiler/i8086/r8086int.inc +++ b/compiler/i8086/r8086int.inc @@ -31,6 +31,7 @@ 'fs', 'gs', 'flags', +'eflags', 'eip', 'dr0', 'dr1', diff --git a/compiler/i8086/r8086iri.inc b/compiler/i8086/r8086iri.inc index 56d4e075ae..a6771fe29f 100644 --- a/compiler/i8086/r8086iri.inc +++ b/compiler/i8086/r8086iri.inc @@ -9,21 +9,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -33,13 +33,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -47,11 +47,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -59,12 +59,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 77, 78, 79, -80 +80, +81 diff --git a/compiler/i8086/r8086nasm.inc b/compiler/i8086/r8086nasm.inc index 40018df5cb..d3f43e9c13 100644 --- a/compiler/i8086/r8086nasm.inc +++ b/compiler/i8086/r8086nasm.inc @@ -31,6 +31,7 @@ 'fs', 'gs', 'flags', +'eflags', 'eip', 'dr0', 'dr1', diff --git a/compiler/i8086/r8086nor.inc b/compiler/i8086/r8086nor.inc index b4d5de5c03..e26ada03f3 100644 --- a/compiler/i8086/r8086nor.inc +++ b/compiler/i8086/r8086nor.inc @@ -1,2 +1,2 @@ { don't edit, this file is generated from x86reg.dat } -81 +82 diff --git a/compiler/i8086/r8086nri.inc b/compiler/i8086/r8086nri.inc index 56d4e075ae..a6771fe29f 100644 --- a/compiler/i8086/r8086nri.inc +++ b/compiler/i8086/r8086nri.inc @@ -9,21 +9,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -33,13 +33,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -47,11 +47,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -59,12 +59,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 77, 78, 79, -80 +80, +81 diff --git a/compiler/i8086/r8086num.inc b/compiler/i8086/r8086num.inc index c73b17c9ce..e04e047ad3 100644 --- a/compiler/i8086/r8086num.inc +++ b/compiler/i8086/r8086num.inc @@ -30,7 +30,8 @@ tregister($05000002), tregister($05000003), tregister($05000004), tregister($05000005), -tregister($05000006), +tregister($05030006), +tregister($05040006), tregister($05040007), tregister($05000008), tregister($05000009), diff --git a/compiler/i8086/r8086ot.inc b/compiler/i8086/r8086ot.inc index ebb569ca61..a46eb7c504 100644 --- a/compiler/i8086/r8086ot.inc +++ b/compiler/i8086/r8086ot.inc @@ -32,6 +32,7 @@ OT_REG_FSGS, OT_REG_FSGS, OT_NONE, OT_NONE, +OT_NONE, OT_REG_DREG, OT_REG_DREG, OT_REG_DREG, diff --git a/compiler/i8086/r8086rni.inc b/compiler/i8086/r8086rni.inc index acf306aa50..52f3d8d9b6 100644 --- a/compiler/i8086/r8086rni.inc +++ b/compiler/i8086/r8086rni.inc @@ -24,7 +24,6 @@ 20, 22, 24, -48, 49, 50, 51, @@ -57,14 +56,13 @@ 78, 79, 80, +81, 25, 26, 27, 28, 29, 30, -31, -33, 34, 35, 36, @@ -79,4 +77,7 @@ 45, 46, 47, -32 +48, +31, +32, +33 diff --git a/compiler/i8086/r8086sri.inc b/compiler/i8086/r8086sri.inc index 56d4e075ae..a6771fe29f 100644 --- a/compiler/i8086/r8086sri.inc +++ b/compiler/i8086/r8086sri.inc @@ -9,21 +9,21 @@ 15, 6, 5, -39, 40, 41, 42, +43, 26, 7, 10, 19, 9, -33, 34, 35, 36, 37, 38, +39, 28, 11, 4, @@ -33,13 +33,13 @@ 20, 12, 32, +33, 25, 18, 24, 31, 29, 30, -57, 58, 59, 60, @@ -47,11 +47,11 @@ 62, 63, 64, +65, 17, 23, 27, -56, -48, +57, 49, 50, 51, @@ -59,12 +59,12 @@ 53, 54, 55, -43, +56, 44, 45, 46, 47, -65, +48, 66, 67, 68, @@ -79,4 +79,5 @@ 77, 78, 79, -80 +80, +81 diff --git a/compiler/i8086/r8086stab.inc b/compiler/i8086/r8086stab.inc index 4011a98e70..d577d7357a 100644 --- a/compiler/i8086/r8086stab.inc +++ b/compiler/i8086/r8086stab.inc @@ -47,6 +47,7 @@ -1, -1, -1, +-1, 12, 13, 14, diff --git a/compiler/i8086/r8086std.inc b/compiler/i8086/r8086std.inc index 3dbec0852c..46b009753d 100644 --- a/compiler/i8086/r8086std.inc +++ b/compiler/i8086/r8086std.inc @@ -31,6 +31,7 @@ 'fs', 'gs', 'flags', +'eflags', 'eip', 'dr0', 'dr1', diff --git a/compiler/x86/cpubase.pas b/compiler/x86/cpubase.pas index 68eb67f07b..bfb2d1c11e 100644 --- a/compiler/x86/cpubase.pas +++ b/compiler/x86/cpubase.pas @@ -145,7 +145,13 @@ uses RS_XMM14 = $0e; RS_XMM15 = $0f; - RS_FLAGS = $07; +{$if defined(x86_64)} + RS_RFLAGS = $06; +{$elseif defined(i386)} + RS_EFLAGS = $06; +{$elseif defined(i8086)} + RS_FLAGS = $06; +{$endif} { Number of first imaginary register } {$ifdef x86_64} @@ -219,8 +225,16 @@ uses {$endif} ); +{$if defined(x86_64)} + RS_DEFAULTFLAGS = RS_RFLAGS; + NR_DEFAULTFLAGS = NR_RFLAGS; +{$elseif defined(i386)} + RS_DEFAULTFLAGS = RS_EFLAGS; + NR_DEFAULTFLAGS = NR_EFLAGS; +{$elseif defined(i8086)} RS_DEFAULTFLAGS = RS_FLAGS; NR_DEFAULTFLAGS = NR_FLAGS; +{$endif} type totherregisterset = set of tregisterindex; diff --git a/compiler/x86/rax86int.pas b/compiler/x86/rax86int.pas index e6422a14c2..934d2f018c 100644 --- a/compiler/x86/rax86int.pas +++ b/compiler/x86/rax86int.pas @@ -229,7 +229,7 @@ Unit Rax86int; is_register:=false; actasmregister:=masm_regnum_search(lower(s)); { don't acceps "flags" as register name in an instruction } - if actasmregister=NR_FLAGS then + if (getsupreg(actasmregister)=RS_DEFAULTFLAGS) and (getregtype(actasmregister)=getregtype(NR_DEFAULTFLAGS)) then actasmregister:=NR_NO; if (actasmregister=NR_NO) and (current_procinfo.procdef.proccalloption=pocall_register) and diff --git a/compiler/x86/x86reg.dat b/compiler/x86/x86reg.dat index 7066c433e7..1a223aa8c8 100644 --- a/compiler/x86/x86reg.dat +++ b/compiler/x86/x86reg.dat @@ -91,7 +91,9 @@ NR_DS,$05000003,ds,%ds,ds,ds,-1,-1,-1,OT_REG_DESS,3 NR_FS,$05000004,fs,%fs,fs,fs,-1,-1,-1,OT_REG_FSGS,4 NR_GS,$05000005,gs,%gs,gs,gs,-1,-1,-1,OT_REG_FSGS,5 -NR_FLAGS,$05000006,flags,%flags,flags,flags,-1,-1,-1,OT_NONE,0 +NR_FLAGS,$05030006,flags,%flags,flags,flags,-1,-1,-1,OT_NONE,0 +NR_EFLAGS,$05040006,eflags,%eflags,eflags,eflags,-1,-1,-1,OT_NONE,0 +NR_RFLAGS,$05050006,rflags,%rflags,rflags,rflags,-1,-1,-1,OT_NONE,0,64 ; EIP is needed for DWARF call frame info return address (RA) NR_RIP,$05050007,rip,%rip,rip,rip,-1,8,16,OT_NONE,0,64 NR_EIP,$05040007,eip,%eip,eip,eip,-1,8,16,OT_NONE,0 diff --git a/compiler/x86_64/r8664ari.inc b/compiler/x86_64/r8664ari.inc index 84da787602..6a2c421567 100644 --- a/compiler/x86_64/r8664ari.inc +++ b/compiler/x86_64/r8664ari.inc @@ -9,22 +9,22 @@ 18, 7, 6, -84, -85, 86, 87, +88, +89, 70, 8, 12, 26, 25, 11, -78, -79, 80, 81, 82, 83, +84, +85, 72, 13, 4, @@ -33,21 +33,22 @@ 9, 27, 14, -77, +76, +79, 69, 23, 35, 75, 73, 74, -102, -103, 104, 105, 106, 107, 108, 109, +110, +111, 45, 46, 48, @@ -86,7 +87,8 @@ 10, 28, 15, -76, +77, +78, 24, 36, 22, @@ -94,50 +96,50 @@ 34, 33, 71, -101, -93, -94, +103, 95, 96, 97, 98, 99, 100, -88, -89, +101, +102, 90, 91, 92, -110, -111, -120, -121, +93, +94, +112, +113, 122, 123, 124, 125, -112, -113, +126, +127, 114, 115, 116, 117, 118, 119, -126, -127, -136, -137, +120, +121, +128, +129, 138, 139, 140, 141, -128, -129, +142, +143, 130, 131, 132, 133, 134, 135, +136, +137, 0 diff --git a/compiler/x86_64/r8664att.inc b/compiler/x86_64/r8664att.inc index 274f988b60..4ec72991cb 100644 --- a/compiler/x86_64/r8664att.inc +++ b/compiler/x86_64/r8664att.inc @@ -75,6 +75,8 @@ '%fs', '%gs', '%flags', +'%eflags', +'%rflags', '%rip', '%eip', '%dr0', diff --git a/compiler/x86_64/r8664con.inc b/compiler/x86_64/r8664con.inc index b80700f0f2..558a16245f 100644 --- a/compiler/x86_64/r8664con.inc +++ b/compiler/x86_64/r8664con.inc @@ -74,7 +74,9 @@ NR_SS = tregister($05000002); NR_DS = tregister($05000003); NR_FS = tregister($05000004); NR_GS = tregister($05000005); -NR_FLAGS = tregister($05000006); +NR_FLAGS = tregister($05030006); +NR_EFLAGS = tregister($05040006); +NR_RFLAGS = tregister($05050006); NR_RIP = tregister($05050007); NR_EIP = tregister($05040007); NR_DR0 = tregister($05000008); diff --git a/compiler/x86_64/r8664dwrf.inc b/compiler/x86_64/r8664dwrf.inc index 8439bdea03..aa14bca3a5 100644 --- a/compiler/x86_64/r8664dwrf.inc +++ b/compiler/x86_64/r8664dwrf.inc @@ -75,6 +75,8 @@ -1, -1, -1, +-1, +-1, 16, 16, -1, diff --git a/compiler/x86_64/r8664int.inc b/compiler/x86_64/r8664int.inc index 83be60c23c..0b11b0f896 100644 --- a/compiler/x86_64/r8664int.inc +++ b/compiler/x86_64/r8664int.inc @@ -75,6 +75,8 @@ 'fs', 'gs', 'flags', +'eflags', +'rflags', 'rip', 'eip', 'dr0', diff --git a/compiler/x86_64/r8664iri.inc b/compiler/x86_64/r8664iri.inc index 038deeb04e..3a36e9b204 100644 --- a/compiler/x86_64/r8664iri.inc +++ b/compiler/x86_64/r8664iri.inc @@ -10,22 +10,22 @@ 18, 7, 6, -84, -85, 86, 87, +88, +89, 70, 8, 12, 26, 25, 11, -78, -79, 80, 81, 82, 83, +84, +85, 72, 13, 4, @@ -34,21 +34,22 @@ 9, 27, 14, -77, +76, +79, 69, 23, 35, 75, 73, 74, -102, -103, 104, 105, 106, 107, 108, 109, +110, +111, 45, 46, 48, @@ -87,7 +88,8 @@ 10, 28, 15, -76, +77, +78, 24, 36, 22, @@ -95,49 +97,49 @@ 34, 33, 71, -101, -93, -94, +103, 95, 96, 97, 98, 99, 100, -88, -89, +101, +102, 90, 91, 92, -110, -111, -120, -121, +93, +94, +112, +113, 122, 123, 124, 125, -112, -113, +126, +127, 114, 115, 116, 117, 118, 119, -126, -127, -136, -137, +120, +121, +128, +129, 138, 139, 140, 141, -128, -129, +142, +143, 130, 131, 132, 133, 134, -135 +135, +136, +137 diff --git a/compiler/x86_64/r8664nasm.inc b/compiler/x86_64/r8664nasm.inc index 35a4000749..2dc7579428 100644 --- a/compiler/x86_64/r8664nasm.inc +++ b/compiler/x86_64/r8664nasm.inc @@ -75,6 +75,8 @@ 'fs', 'gs', 'flags', +'eflags', +'rflags', 'rip', 'eip', 'dr0', diff --git a/compiler/x86_64/r8664nor.inc b/compiler/x86_64/r8664nor.inc index d0c8805f4c..763e43ec9b 100644 --- a/compiler/x86_64/r8664nor.inc +++ b/compiler/x86_64/r8664nor.inc @@ -1,2 +1,2 @@ { don't edit, this file is generated from x86reg.dat } -142 +144 diff --git a/compiler/x86_64/r8664num.inc b/compiler/x86_64/r8664num.inc index 0b93510402..69b3c8a05d 100644 --- a/compiler/x86_64/r8664num.inc +++ b/compiler/x86_64/r8664num.inc @@ -74,7 +74,9 @@ tregister($05000002), tregister($05000003), tregister($05000004), tregister($05000005), -tregister($05000006), +tregister($05030006), +tregister($05040006), +tregister($05050006), tregister($05050007), tregister($05040007), tregister($05000008), diff --git a/compiler/x86_64/r8664ot.inc b/compiler/x86_64/r8664ot.inc index c0e6f9f18c..ff66c41b00 100644 --- a/compiler/x86_64/r8664ot.inc +++ b/compiler/x86_64/r8664ot.inc @@ -77,6 +77,8 @@ OT_REG_FSGS, OT_NONE, OT_NONE, OT_NONE, +OT_NONE, +OT_NONE, OT_REG_DREG, OT_REG_DREG, OT_REG_DREG, diff --git a/compiler/x86_64/r8664rni.inc b/compiler/x86_64/r8664rni.inc index fdd5b95638..f205bd0dce 100644 --- a/compiler/x86_64/r8664rni.inc +++ b/compiler/x86_64/r8664rni.inc @@ -68,8 +68,6 @@ 57, 61, 65, -93, -94, 95, 96, 97, @@ -117,15 +115,14 @@ 139, 140, 141, +142, +143, 69, 70, 71, 72, 73, 74, -75, -78, -79, 80, 81, 82, @@ -139,5 +136,10 @@ 90, 91, 92, +93, +94, +75, +76, +79, 77, -76 +78 diff --git a/compiler/x86_64/r8664sri.inc b/compiler/x86_64/r8664sri.inc index 038deeb04e..3a36e9b204 100644 --- a/compiler/x86_64/r8664sri.inc +++ b/compiler/x86_64/r8664sri.inc @@ -10,22 +10,22 @@ 18, 7, 6, -84, -85, 86, 87, +88, +89, 70, 8, 12, 26, 25, 11, -78, -79, 80, 81, 82, 83, +84, +85, 72, 13, 4, @@ -34,21 +34,22 @@ 9, 27, 14, -77, +76, +79, 69, 23, 35, 75, 73, 74, -102, -103, 104, 105, 106, 107, 108, 109, +110, +111, 45, 46, 48, @@ -87,7 +88,8 @@ 10, 28, 15, -76, +77, +78, 24, 36, 22, @@ -95,49 +97,49 @@ 34, 33, 71, -101, -93, -94, +103, 95, 96, 97, 98, 99, 100, -88, -89, +101, +102, 90, 91, 92, -110, -111, -120, -121, +93, +94, +112, +113, 122, 123, 124, 125, -112, -113, +126, +127, 114, 115, 116, 117, 118, 119, -126, -127, -136, -137, +120, +121, +128, +129, 138, 139, 140, 141, -128, -129, +142, +143, 130, 131, 132, 133, 134, -135 +135, +136, +137 diff --git a/compiler/x86_64/r8664stab.inc b/compiler/x86_64/r8664stab.inc index 8439bdea03..aa14bca3a5 100644 --- a/compiler/x86_64/r8664stab.inc +++ b/compiler/x86_64/r8664stab.inc @@ -75,6 +75,8 @@ -1, -1, -1, +-1, +-1, 16, 16, -1, diff --git a/compiler/x86_64/r8664std.inc b/compiler/x86_64/r8664std.inc index 83be60c23c..0b11b0f896 100644 --- a/compiler/x86_64/r8664std.inc +++ b/compiler/x86_64/r8664std.inc @@ -75,6 +75,8 @@ 'fs', 'gs', 'flags', +'eflags', +'rflags', 'rip', 'eip', 'dr0',