diff --git a/compiler/i386/r386ari.inc b/compiler/i386/r386ari.inc
index 308a4e9366..1473f5b2ea 100644
--- a/compiler/i386/r386ari.inc
+++ b/compiler/i386/r386ari.inc
@@ -8,21 +8,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -35,7 +35,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -58,11 +58,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i386/r386att.inc b/compiler/i386/r386att.inc
index a1ffa9a4e5..2dec7bfa45 100644
--- a/compiler/i386/r386att.inc
+++ b/compiler/i386/r386att.inc
@@ -31,7 +31,6 @@
 '%ss',
 '%fs',
 '%gs',
-'%flags',
 '%dr0',
 '%dr1',
 '%dr2',
@@ -47,6 +46,7 @@
 '%tr5',
 '%tr6',
 '%tr7',
+'%flags',
 '%st(0)',
 '%st(1)',
 '%st(2)',
diff --git a/compiler/i386/r386con.inc b/compiler/i386/r386con.inc
index 7490b4284b..ce4c376931 100644
--- a/compiler/i386/r386con.inc
+++ b/compiler/i386/r386con.inc
@@ -31,7 +31,6 @@ NR_ES = tregister($05000003);
 NR_SS = tregister($05000004);
 NR_FS = tregister($05000005);
 NR_GS = tregister($05000006);
-NR_FLAGS = tregister($05000007);
 NR_DR0 = tregister($05000007);
 NR_DR1 = tregister($05000008);
 NR_DR2 = tregister($05000009);
@@ -47,6 +46,7 @@ NR_TR4 = tregister($05000012);
 NR_TR5 = tregister($05000013);
 NR_TR6 = tregister($05000014);
 NR_TR7 = tregister($05000015);
+NR_FLAGS = tregister($05000016);
 NR_ST0 = tregister($02000000);
 NR_ST1 = tregister($02000001);
 NR_ST2 = tregister($02000002);
diff --git a/compiler/i386/r386int.inc b/compiler/i386/r386int.inc
index c1cc5aafe9..51536181fb 100644
--- a/compiler/i386/r386int.inc
+++ b/compiler/i386/r386int.inc
@@ -31,7 +31,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -47,6 +46,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st(0)',
 'st(1)',
 'st(2)',
diff --git a/compiler/i386/r386iri.inc b/compiler/i386/r386iri.inc
index 6dc9c21e2f..07c4714182 100644
--- a/compiler/i386/r386iri.inc
+++ b/compiler/i386/r386iri.inc
@@ -9,21 +9,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -36,7 +36,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -59,11 +59,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i386/r386nasm.inc b/compiler/i386/r386nasm.inc
index d8d754fa18..5a23ec0f70 100644
--- a/compiler/i386/r386nasm.inc
+++ b/compiler/i386/r386nasm.inc
@@ -31,7 +31,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -47,6 +46,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st0',
 'st1',
 'st2',
diff --git a/compiler/i386/r386nri.inc b/compiler/i386/r386nri.inc
index 6dc9c21e2f..07c4714182 100644
--- a/compiler/i386/r386nri.inc
+++ b/compiler/i386/r386nri.inc
@@ -9,21 +9,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -36,7 +36,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -59,11 +59,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i386/r386num.inc b/compiler/i386/r386num.inc
index b64c292e6b..0312b59a88 100644
--- a/compiler/i386/r386num.inc
+++ b/compiler/i386/r386num.inc
@@ -32,7 +32,6 @@ tregister($05000004),
 tregister($05000005),
 tregister($05000006),
 tregister($05000007),
-tregister($05000007),
 tregister($05000008),
 tregister($05000009),
 tregister($0500000a),
@@ -47,6 +46,7 @@ tregister($05000012),
 tregister($05000013),
 tregister($05000014),
 tregister($05000015),
+tregister($05000016),
 tregister($02000000),
 tregister($02000001),
 tregister($02000002),
diff --git a/compiler/i386/r386op.inc b/compiler/i386/r386op.inc
index f8d7f13e05..d158d5509c 100644
--- a/compiler/i386/r386op.inc
+++ b/compiler/i386/r386op.inc
@@ -32,7 +32,6 @@
 4,
 5,
 0,
-0,
 1,
 2,
 3,
@@ -48,6 +47,7 @@
 6,
 7,
 0,
+0,
 1,
 2,
 3,
diff --git a/compiler/i386/r386ot.inc b/compiler/i386/r386ot.inc
index 663b499a3d..071495ba2e 100644
--- a/compiler/i386/r386ot.inc
+++ b/compiler/i386/r386ot.inc
@@ -31,7 +31,6 @@ OT_REG_DESS,
 OT_REG_DESS,
 OT_REG_FSGS,
 OT_REG_FSGS,
-OT_NONE,
 OT_REG_DREG,
 OT_REG_DREG,
 OT_REG_DREG,
@@ -47,6 +46,7 @@ OT_REG_TREG,
 OT_REG_TREG,
 OT_REG_TREG,
 OT_REG_TREG,
+OT_NONE,
 OT_FPU0,
 OT_FPUREG,
 OT_FPUREG,
diff --git a/compiler/i386/r386rni.inc b/compiler/i386/r386rni.inc
index 8ba7ff2abe..f7c780280f 100644
--- a/compiler/i386/r386rni.inc
+++ b/compiler/i386/r386rni.inc
@@ -63,8 +63,8 @@
 29,
 30,
 31,
-33,
 32,
+33,
 34,
 35,
 36,
diff --git a/compiler/i386/r386sri.inc b/compiler/i386/r386sri.inc
index 6dc9c21e2f..07c4714182 100644
--- a/compiler/i386/r386sri.inc
+++ b/compiler/i386/r386sri.inc
@@ -9,21 +9,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -36,7 +36,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -59,11 +59,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i386/r386std.inc b/compiler/i386/r386std.inc
index c1cc5aafe9..51536181fb 100644
--- a/compiler/i386/r386std.inc
+++ b/compiler/i386/r386std.inc
@@ -31,7 +31,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -47,6 +46,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st(0)',
 'st(1)',
 'st(2)',
diff --git a/compiler/i8086/r8086ari.inc b/compiler/i8086/r8086ari.inc
index 308a4e9366..1473f5b2ea 100644
--- a/compiler/i8086/r8086ari.inc
+++ b/compiler/i8086/r8086ari.inc
@@ -8,21 +8,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -35,7 +35,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -58,11 +58,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i8086/r8086att.inc b/compiler/i8086/r8086att.inc
index a1ffa9a4e5..2dec7bfa45 100644
--- a/compiler/i8086/r8086att.inc
+++ b/compiler/i8086/r8086att.inc
@@ -31,7 +31,6 @@
 '%ss',
 '%fs',
 '%gs',
-'%flags',
 '%dr0',
 '%dr1',
 '%dr2',
@@ -47,6 +46,7 @@
 '%tr5',
 '%tr6',
 '%tr7',
+'%flags',
 '%st(0)',
 '%st(1)',
 '%st(2)',
diff --git a/compiler/i8086/r8086con.inc b/compiler/i8086/r8086con.inc
index 7490b4284b..ce4c376931 100644
--- a/compiler/i8086/r8086con.inc
+++ b/compiler/i8086/r8086con.inc
@@ -31,7 +31,6 @@ NR_ES = tregister($05000003);
 NR_SS = tregister($05000004);
 NR_FS = tregister($05000005);
 NR_GS = tregister($05000006);
-NR_FLAGS = tregister($05000007);
 NR_DR0 = tregister($05000007);
 NR_DR1 = tregister($05000008);
 NR_DR2 = tregister($05000009);
@@ -47,6 +46,7 @@ NR_TR4 = tregister($05000012);
 NR_TR5 = tregister($05000013);
 NR_TR6 = tregister($05000014);
 NR_TR7 = tregister($05000015);
+NR_FLAGS = tregister($05000016);
 NR_ST0 = tregister($02000000);
 NR_ST1 = tregister($02000001);
 NR_ST2 = tregister($02000002);
diff --git a/compiler/i8086/r8086int.inc b/compiler/i8086/r8086int.inc
index c1cc5aafe9..51536181fb 100644
--- a/compiler/i8086/r8086int.inc
+++ b/compiler/i8086/r8086int.inc
@@ -31,7 +31,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -47,6 +46,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st(0)',
 'st(1)',
 'st(2)',
diff --git a/compiler/i8086/r8086iri.inc b/compiler/i8086/r8086iri.inc
index 6dc9c21e2f..07c4714182 100644
--- a/compiler/i8086/r8086iri.inc
+++ b/compiler/i8086/r8086iri.inc
@@ -9,21 +9,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -36,7 +36,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -59,11 +59,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i8086/r8086nasm.inc b/compiler/i8086/r8086nasm.inc
index d8d754fa18..5a23ec0f70 100644
--- a/compiler/i8086/r8086nasm.inc
+++ b/compiler/i8086/r8086nasm.inc
@@ -31,7 +31,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -47,6 +46,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st0',
 'st1',
 'st2',
diff --git a/compiler/i8086/r8086nri.inc b/compiler/i8086/r8086nri.inc
index 6dc9c21e2f..07c4714182 100644
--- a/compiler/i8086/r8086nri.inc
+++ b/compiler/i8086/r8086nri.inc
@@ -9,21 +9,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -36,7 +36,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -59,11 +59,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i8086/r8086num.inc b/compiler/i8086/r8086num.inc
index b64c292e6b..0312b59a88 100644
--- a/compiler/i8086/r8086num.inc
+++ b/compiler/i8086/r8086num.inc
@@ -32,7 +32,6 @@ tregister($05000004),
 tregister($05000005),
 tregister($05000006),
 tregister($05000007),
-tregister($05000007),
 tregister($05000008),
 tregister($05000009),
 tregister($0500000a),
@@ -47,6 +46,7 @@ tregister($05000012),
 tregister($05000013),
 tregister($05000014),
 tregister($05000015),
+tregister($05000016),
 tregister($02000000),
 tregister($02000001),
 tregister($02000002),
diff --git a/compiler/i8086/r8086op.inc b/compiler/i8086/r8086op.inc
index f8d7f13e05..d158d5509c 100644
--- a/compiler/i8086/r8086op.inc
+++ b/compiler/i8086/r8086op.inc
@@ -32,7 +32,6 @@
 4,
 5,
 0,
-0,
 1,
 2,
 3,
@@ -48,6 +47,7 @@
 6,
 7,
 0,
+0,
 1,
 2,
 3,
diff --git a/compiler/i8086/r8086ot.inc b/compiler/i8086/r8086ot.inc
index 663b499a3d..071495ba2e 100644
--- a/compiler/i8086/r8086ot.inc
+++ b/compiler/i8086/r8086ot.inc
@@ -31,7 +31,6 @@ OT_REG_DESS,
 OT_REG_DESS,
 OT_REG_FSGS,
 OT_REG_FSGS,
-OT_NONE,
 OT_REG_DREG,
 OT_REG_DREG,
 OT_REG_DREG,
@@ -47,6 +46,7 @@ OT_REG_TREG,
 OT_REG_TREG,
 OT_REG_TREG,
 OT_REG_TREG,
+OT_NONE,
 OT_FPU0,
 OT_FPUREG,
 OT_FPUREG,
diff --git a/compiler/i8086/r8086rni.inc b/compiler/i8086/r8086rni.inc
index 8ba7ff2abe..f7c780280f 100644
--- a/compiler/i8086/r8086rni.inc
+++ b/compiler/i8086/r8086rni.inc
@@ -63,8 +63,8 @@
 29,
 30,
 31,
-33,
 32,
+33,
 34,
 35,
 36,
diff --git a/compiler/i8086/r8086sri.inc b/compiler/i8086/r8086sri.inc
index 6dc9c21e2f..07c4714182 100644
--- a/compiler/i8086/r8086sri.inc
+++ b/compiler/i8086/r8086sri.inc
@@ -9,21 +9,21 @@
 15,
 6,
 5,
+38,
 39,
 40,
 41,
-42,
 26,
 7,
 10,
 19,
 9,
+32,
 33,
 34,
 35,
 36,
 37,
-38,
 27,
 11,
 4,
@@ -36,7 +36,7 @@
 28,
 18,
 24,
-32,
+47,
 30,
 31,
 57,
@@ -59,11 +59,11 @@
 53,
 54,
 55,
+42,
 43,
 44,
 45,
 46,
-47,
 65,
 66,
 67,
diff --git a/compiler/i8086/r8086std.inc b/compiler/i8086/r8086std.inc
index c1cc5aafe9..51536181fb 100644
--- a/compiler/i8086/r8086std.inc
+++ b/compiler/i8086/r8086std.inc
@@ -31,7 +31,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -47,6 +46,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st(0)',
 'st(1)',
 'st(2)',
diff --git a/compiler/x86/x86reg.dat b/compiler/x86/x86reg.dat
index aa426d0e6e..568d4ec828 100644
--- a/compiler/x86/x86reg.dat
+++ b/compiler/x86/x86reg.dat
@@ -85,7 +85,6 @@ NR_ES,$05000003,es,%es,es,es,-1,-1,-1,OT_REG_DESS,0
 NR_SS,$05000004,ss,%ss,ss,ss,-1,-1,-1,OT_REG_DESS,2
 NR_FS,$05000005,fs,%fs,fs,fs,-1,-1,-1,OT_REG_FSGS,4
 NR_GS,$05000006,gs,%gs,gs,gs,-1,-1,-1,OT_REG_FSGS,5
-NR_FLAGS,$05000007,flags,%flags,flags,flags,-1,-1,-1,OT_NONE,0
 
 NR_DR0,$05000007,dr0,%dr0,dr0,dr0,-1,-1,-1,OT_REG_DREG,0
 NR_DR1,$05000008,dr1,%dr1,dr1,dr1,-1,-1,-1,OT_REG_DREG,1
@@ -103,6 +102,8 @@ NR_TR5,$05000013,tr5,%tr5,tr5,tr5,-1,-1,-1,OT_REG_TREG,5
 NR_TR6,$05000014,tr6,%tr6,tr6,tr6,-1,-1,-1,OT_REG_TREG,6
 NR_TR7,$05000015,tr7,%tr7,tr7,tr7,-1,-1,-1,OT_REG_TREG,7
 
+NR_FLAGS,$05000016,flags,%flags,flags,flags,-1,-1,-1,OT_NONE,0
+
 NR_ST0,$02000000,st(0),%st(0),st(0),st0,12,11,33,OT_FPU0,0
 NR_ST1,$02000001,st(1),%st(1),st(1),st1,13,12,34,OT_FPUREG,1
 NR_ST2,$02000002,st(2),%st(2),st(2),st2,14,13,35,OT_FPUREG,2
diff --git a/compiler/x86_64/r8664ari.inc b/compiler/x86_64/r8664ari.inc
index 0c2ba57fe9..83e22477be 100644
--- a/compiler/x86_64/r8664ari.inc
+++ b/compiler/x86_64/r8664ari.inc
@@ -9,22 +9,22 @@
 18,
 7,
 6,
+83,
 84,
 85,
 86,
-87,
 71,
 8,
 12,
 26,
 25,
 11,
+77,
 78,
 79,
 80,
 81,
 82,
-83,
 72,
 13,
 4,
@@ -37,7 +37,7 @@
 73,
 23,
 35,
-77,
+92,
 75,
 76,
 102,
@@ -103,11 +103,11 @@
 98,
 99,
 100,
+87,
 88,
 89,
 90,
 91,
-92,
 110,
 111,
 120,
diff --git a/compiler/x86_64/r8664att.inc b/compiler/x86_64/r8664att.inc
index 15174227ba..dce693584c 100644
--- a/compiler/x86_64/r8664att.inc
+++ b/compiler/x86_64/r8664att.inc
@@ -76,7 +76,6 @@
 '%ss',
 '%fs',
 '%gs',
-'%flags',
 '%dr0',
 '%dr1',
 '%dr2',
@@ -92,6 +91,7 @@
 '%tr5',
 '%tr6',
 '%tr7',
+'%flags',
 '%st(0)',
 '%st(1)',
 '%st(2)',
diff --git a/compiler/x86_64/r8664con.inc b/compiler/x86_64/r8664con.inc
index 360887252b..70e28bc290 100644
--- a/compiler/x86_64/r8664con.inc
+++ b/compiler/x86_64/r8664con.inc
@@ -76,7 +76,6 @@ NR_ES = tregister($05000003);
 NR_SS = tregister($05000004);
 NR_FS = tregister($05000005);
 NR_GS = tregister($05000006);
-NR_FLAGS = tregister($05000007);
 NR_DR0 = tregister($05000007);
 NR_DR1 = tregister($05000008);
 NR_DR2 = tregister($05000009);
@@ -92,6 +91,7 @@ NR_TR4 = tregister($05000012);
 NR_TR5 = tregister($05000013);
 NR_TR6 = tregister($05000014);
 NR_TR7 = tregister($05000015);
+NR_FLAGS = tregister($05000016);
 NR_ST0 = tregister($02000000);
 NR_ST1 = tregister($02000001);
 NR_ST2 = tregister($02000002);
diff --git a/compiler/x86_64/r8664int.inc b/compiler/x86_64/r8664int.inc
index 15cd8cbe8c..a97d35ea34 100644
--- a/compiler/x86_64/r8664int.inc
+++ b/compiler/x86_64/r8664int.inc
@@ -76,7 +76,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -92,6 +91,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st(0)',
 'st(1)',
 'st(2)',
diff --git a/compiler/x86_64/r8664iri.inc b/compiler/x86_64/r8664iri.inc
index 2cb03299ab..f7c324f391 100644
--- a/compiler/x86_64/r8664iri.inc
+++ b/compiler/x86_64/r8664iri.inc
@@ -10,22 +10,22 @@
 18,
 7,
 6,
+83,
 84,
 85,
 86,
-87,
 71,
 8,
 12,
 26,
 25,
 11,
+77,
 78,
 79,
 80,
 81,
 82,
-83,
 72,
 13,
 4,
@@ -38,7 +38,7 @@
 73,
 23,
 35,
-77,
+92,
 75,
 76,
 102,
@@ -104,11 +104,11 @@
 98,
 99,
 100,
+87,
 88,
 89,
 90,
 91,
-92,
 110,
 111,
 120,
diff --git a/compiler/x86_64/r8664num.inc b/compiler/x86_64/r8664num.inc
index fe2b5e632b..0337b87591 100644
--- a/compiler/x86_64/r8664num.inc
+++ b/compiler/x86_64/r8664num.inc
@@ -77,7 +77,6 @@ tregister($05000004),
 tregister($05000005),
 tregister($05000006),
 tregister($05000007),
-tregister($05000007),
 tregister($05000008),
 tregister($05000009),
 tregister($0500000a),
@@ -92,6 +91,7 @@ tregister($05000012),
 tregister($05000013),
 tregister($05000014),
 tregister($05000015),
+tregister($05000016),
 tregister($02000000),
 tregister($02000001),
 tregister($02000002),
diff --git a/compiler/x86_64/r8664op.inc b/compiler/x86_64/r8664op.inc
index 6e70e28784..4994110fb6 100644
--- a/compiler/x86_64/r8664op.inc
+++ b/compiler/x86_64/r8664op.inc
@@ -77,7 +77,6 @@
 4,
 5,
 0,
-0,
 1,
 2,
 3,
@@ -93,6 +92,7 @@
 6,
 7,
 0,
+0,
 1,
 2,
 3,
diff --git a/compiler/x86_64/r8664ot.inc b/compiler/x86_64/r8664ot.inc
index 77462e1776..f1ccf47278 100644
--- a/compiler/x86_64/r8664ot.inc
+++ b/compiler/x86_64/r8664ot.inc
@@ -76,7 +76,6 @@ OT_REG_DESS,
 OT_REG_DESS,
 OT_REG_FSGS,
 OT_REG_FSGS,
-OT_NONE,
 OT_REG_DREG,
 OT_REG_DREG,
 OT_REG_DREG,
@@ -92,6 +91,7 @@ OT_REG_TREG,
 OT_REG_TREG,
 OT_REG_TREG,
 OT_REG_TREG,
+OT_NONE,
 OT_FPU0,
 OT_FPUREG,
 OT_FPUREG,
diff --git a/compiler/x86_64/r8664rni.inc b/compiler/x86_64/r8664rni.inc
index fa5af9efcd..aabbffae1f 100644
--- a/compiler/x86_64/r8664rni.inc
+++ b/compiler/x86_64/r8664rni.inc
@@ -123,8 +123,8 @@
 74,
 75,
 76,
-78,
 77,
+78,
 79,
 80,
 81,
diff --git a/compiler/x86_64/r8664sri.inc b/compiler/x86_64/r8664sri.inc
index 2cb03299ab..f7c324f391 100644
--- a/compiler/x86_64/r8664sri.inc
+++ b/compiler/x86_64/r8664sri.inc
@@ -10,22 +10,22 @@
 18,
 7,
 6,
+83,
 84,
 85,
 86,
-87,
 71,
 8,
 12,
 26,
 25,
 11,
+77,
 78,
 79,
 80,
 81,
 82,
-83,
 72,
 13,
 4,
@@ -38,7 +38,7 @@
 73,
 23,
 35,
-77,
+92,
 75,
 76,
 102,
@@ -104,11 +104,11 @@
 98,
 99,
 100,
+87,
 88,
 89,
 90,
 91,
-92,
 110,
 111,
 120,
diff --git a/compiler/x86_64/r8664std.inc b/compiler/x86_64/r8664std.inc
index 15cd8cbe8c..a97d35ea34 100644
--- a/compiler/x86_64/r8664std.inc
+++ b/compiler/x86_64/r8664std.inc
@@ -76,7 +76,6 @@
 'ss',
 'fs',
 'gs',
-'flags',
 'dr0',
 'dr1',
 'dr2',
@@ -92,6 +91,7 @@
 'tr5',
 'tr6',
 'tr7',
+'flags',
 'st(0)',
 'st(1)',
 'st(2)',