* 1 R1
* ... ...
* 10 R10
+ * 12 R12
*/
int32
RtoB(int r)
{
- if(r < 2 || r >= REGTMP-2) // excluded R9 and R10 for m and g
+ if(r < 2 || (r >= REGTMP-2 && r != 12)) // excluded R9 and R10 for m and g, but not R12
return 0;
return 1L << r;
}
int
BtoR(int32 b)
{
- b &= 0x01fcL; // excluded R9 and R10 for m and g
+ b &= 0x11fcL; // excluded R9 and R10 for m and g, but not R12
if(b == 0)
return 0;
return bitno(b);
* 18 F2
* 19 F3
* ... ...
- * 23 F7
+ * 31 F15
*/
int32
FtoB(int f)
BtoF(int32 b)
{
- b &= 0xfc0000L;
+ b &= 0xfffc0000L;
if(b == 0)
return 0;
return bitno(b) - 16;
#include "gg.h"
#include "opt.h"
-#define NREGVAR 24
-#define REGBITS ((uint32)0xffffff)
+#define NREGVAR 32
+#define REGBITS ((uint32)0xffffffff)
#define P2R(p) (Reg*)(p->reg)
void addsplits(void);
".F5",
".F6",
".F7",
+ ".F8",
+ ".F9",
+ ".F10",
+ ".F11",
+ ".F12",
+ ".F13",
+ ".F14",
+ ".F15",
};
void
* 1 R1
* ... ...
* 10 R10
+ * 12 R12
*/
int32
RtoB(int r)
{
- if(r >= REGTMP-2) // excluded R9 and R10 for m and g
+ if(r >= REGTMP-2 && r != 12) // excluded R9 and R10 for m and g, but not R12
return 0;
return 1L << r;
}
int
BtoR(int32 b)
{
- b &= 0x01fcL; // excluded R9 and R10 for m and g
+ b &= 0x11fcL; // excluded R9 and R10 for m and g, but not R12
if(b == 0)
return 0;
return bitno(b);
* 18 F2
* 19 F3
* ... ...
- * 23 F7
+ * 31 F15
*/
int32
FtoB(int f)
BtoF(int32 b)
{
- b &= 0xfc0000L;
+ b &= 0xfffc0000L;
if(b == 0)
return 0;
return bitno(b) - 16;