ref: c9530dc787725c9184007bc6c1f5c2c6fcc11ccc
parent: a0e6b9b6b4c4e454201dc18fd04db414f11cd36e
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Mar 13 04:48:32 EDT 2015
Fix code collision Some of the upper case letters were causing collisions, but gcc didn't complaint about it, but ken cc yes. This patch returns the original values to pointer and long, and use K for registers.
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -119,7 +119,7 @@
else if (sym->isglobal)
c = 'G';
else if (sym->isregister)
- c = 'R';
+ c = 'K';
else if (sym->isfield)
c = 'M';
else if (sym->isparameter)
--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -371,10 +371,11 @@
[';'] = increment,
['Y'] = globvar,
['A'] = localvar,
+ ['K'] = localvar,
['T'] = localvar,
['G'] = globvar,
-// ['P'] = paramvar,
-// ['L'] = label,
+ ['P'] = paramvar,
+ ['L'] = label,
['#'] = immediate,
['@'] = unary,
['a'] = unary,
--- a/inc/cc.h
+++ b/inc/cc.h
@@ -30,7 +30,7 @@
#define L_INT8 'C'
#define L_INT16 'I'
-#define L_INT32 'L'
+#define L_INT32 'W'
#define L_INT64 'Q'
#define L_UINT8 'M'
#define L_UINT16 'N'
@@ -38,7 +38,7 @@
#define L_UINT64 'O'
#define L_VOID '0'
-#define L_POINTER 'P'
+#define L_POINTER 'R'
#define L_FUNCTION 'F'
#define L_ARRAY 'V'
#define L_UNION 'U'