File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -1150,20 +1150,21 @@ addreg(Adr *a, int rn)
1150
1150
* 1 R1
1151
1151
* ... ...
1152
1152
* 10 R10
1153
+ * 12 R12
1153
1154
*/
1154
1155
int32
1155
1156
RtoB (int r )
1156
1157
{
1157
1158
1158
- if (r < 2 || r >= REGTMP - 2 ) // excluded R9 and R10 for m and g
1159
+ if (r < 2 || ( r >= REGTMP - 2 && r != 12 )) // excluded R9 and R10 for m and g, but not R12
1159
1160
return 0 ;
1160
1161
return 1L << r ;
1161
1162
}
1162
1163
1163
1164
int
1164
1165
BtoR (int32 b )
1165
1166
{
1166
- b &= 0x01fcL ; // excluded R9 and R10 for m and g
1167
+ b &= 0x11fcL ; // excluded R9 and R10 for m and g, but not R12
1167
1168
if (b == 0 )
1168
1169
return 0 ;
1169
1170
return bitno (b );
@@ -1174,7 +1175,7 @@ BtoR(int32 b)
1174
1175
* 18 F2
1175
1176
* 19 F3
1176
1177
* ... ...
1177
- * 23 F7
1178
+ * 31 F15
1178
1179
*/
1179
1180
int32
1180
1181
FtoB (int f )
@@ -1189,7 +1190,7 @@ int
1189
1190
BtoF (int32 b )
1190
1191
{
1191
1192
1192
- b &= 0xfc0000L ;
1193
+ b &= 0xfffc0000L ;
1193
1194
if (b == 0 )
1194
1195
return 0 ;
1195
1196
return bitno (b ) - 16 ;
Original file line number Diff line number Diff line change 34
34
#include "gg.h"
35
35
#include "opt.h"
36
36
37
- #define NREGVAR 24
38
- #define REGBITS ((uint32)0xffffff )
37
+ #define NREGVAR 32
38
+ #define REGBITS ((uint32)0xffffffff )
39
39
#define P2R (p ) (Reg*)(p->reg)
40
40
41
41
void addsplits (void );
@@ -160,6 +160,14 @@ static char* regname[] = {
160
160
".F5" ,
161
161
".F6" ,
162
162
".F7" ,
163
+ ".F8" ,
164
+ ".F9" ,
165
+ ".F10" ,
166
+ ".F11" ,
167
+ ".F12" ,
168
+ ".F13" ,
169
+ ".F14" ,
170
+ ".F15" ,
163
171
};
164
172
165
173
void
@@ -1486,19 +1494,20 @@ addreg(Adr *a, int rn)
1486
1494
* 1 R1
1487
1495
* ... ...
1488
1496
* 10 R10
1497
+ * 12 R12
1489
1498
*/
1490
1499
int32
1491
1500
RtoB (int r )
1492
1501
{
1493
- if (r >= REGTMP - 2 ) // excluded R9 and R10 for m and g
1502
+ if (r >= REGTMP - 2 && r != 12 ) // excluded R9 and R10 for m and g, but not R12
1494
1503
return 0 ;
1495
1504
return 1L << r ;
1496
1505
}
1497
1506
1498
1507
int
1499
1508
BtoR (int32 b )
1500
1509
{
1501
- b &= 0x01fcL ; // excluded R9 and R10 for m and g
1510
+ b &= 0x11fcL ; // excluded R9 and R10 for m and g, but not R12
1502
1511
if (b == 0 )
1503
1512
return 0 ;
1504
1513
return bitno (b );
@@ -1509,7 +1518,7 @@ BtoR(int32 b)
1509
1518
* 18 F2
1510
1519
* 19 F3
1511
1520
* ... ...
1512
- * 23 F7
1521
+ * 31 F15
1513
1522
*/
1514
1523
int32
1515
1524
FtoB (int f )
@@ -1524,7 +1533,7 @@ int
1524
1533
BtoF (int32 b )
1525
1534
{
1526
1535
1527
- b &= 0xfc0000L ;
1536
+ b &= 0xfffc0000L ;
1528
1537
if (b == 0 )
1529
1538
return 0 ;
1530
1539
return bitno (b ) - 16 ;
Original file line number Diff line number Diff line change 49
49
#define REGM (REGEXT-1)
50
50
/* compiler allocates external registers R10 down */
51
51
#define REGTMP 11
52
- #define REGSB 12
53
52
#define REGSP 13
54
53
#define REGLINK 14
55
54
#define REGPC 15
56
55
57
- #define NFREG 8
56
+ #define NFREG 16
58
57
#define FREGRET 0
59
58
#define FREGEXT 7
60
59
#define FREGTMP 15
You can’t perform that action at this time.
0 commit comments