shithub: scc

Download patch

ref: 5e2de268e633d028c222d3c2bd18a1b3f947502b
parent: 8a71476cce84016b86892eeae18341232a5f612c
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Aug 24 17:56:28 EDT 2015

Use more logical values for & operator in the IR

Take address of a lvalue was using the letter 'a', and the
logical and was using y, but this value was also used by
the return statement. This change makes logical and 'a'
and take address '\'' (it will like to lisper)

--- a/cc1/code.c
+++ b/cc1/code.c
@@ -46,10 +46,10 @@
 	[OA_AND] = ":&",
 	[OA_XOR] = ":^",
 	[OA_OR] = ":|",
-	[OADDR] = "a",
+	[OADDR] = "'",
 	[ONEG] = "_",
 	[OCPL] = "~",
-	[OAND] = "y",
+	[OAND] = "a",
 	[OOR] = "o",
 	[OASK] = "?",
 	[OCOMMA] = ",",
--- a/cc1/tests/test001.c
+++ b/cc1/tests/test001.c
@@ -8,7 +8,7 @@
 G2	F1	main
 {
 -
-	X1	"68656C6C6F20776F726C640A	aP	pP	cI
+	X1	"68656C6C6F20776F726C640A	'P	pP	cI
 	yI	#I0
 }
 */