[hackers] [scc] Join ':' and ';' IR operators || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 24 Sep 2015 22:29:01 +0200 (CEST)

commit ae0f567bba4dd727c7f2f72764b04e9540c36850
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Sep 24 22:27:10 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Sep 24 22:27:10 2015 +0200

    Join ':' and ';' IR operators
    
    These operators can be joined because at the end in both
    cases you have an assignation, so if we join them it is
    easier to generate a SSA alike representation.

diff --git a/cc1/code.c b/cc1/code.c
index aa5ee70..49c96fe 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -23,8 +23,8 @@ char *optxt[] = {
         [OADD] = "+",
         [OSUB] = "-",
         [OMUL] = "*",
- [OINC] = ";+",
- [ODEC] = ";-",
+ [OINC] = ":i",
+ [ODEC] = ":d",
         [OPTR] = "_AT_",
         [OMOD] = "%",
         [ODIV] = "/",
_AT_@ -64,7 +64,7 @@ char *optxt[] = {
         [OBRANCH] = "\tj\tL%d",
         [OEFUN] = "}\n",
         [OELOOP] = "\tb\n",
- [OBLOOP] = "\td\n",
+ [OBLOOP] = "\te\n",
         [ORET] = "\tr",
         [OPAR] = "p",
         [OCALL] = "c",
diff --git a/cc1/ir.md b/cc1/ir.md
index c39eabe..4ffe72e 100644
--- a/cc1/ir.md
+++ b/cc1/ir.md
_AT_@ -176,8 +176,8 @@ Assignation has some suboperators:
 * :& -- bitwise and and assign
 * :^ -- bitwise xor and assign
 * :| -- bitwise or and assign
-* ;+ -- post increment
-* ;- -- post decrement
+* :i -- post increment
+* :d -- post decrement
 
 Every operator in an expression has a type descriptor.
 
_AT_@ -267,7 +267,7 @@ to the backend that the next statements are part of the body
 of a loop:
 
 * b -- begin of loop
-* d -- end of loop
+* e -- end of loop
 
 #### Switch statement ####
 
Received on Thu Sep 24 2015 - 22:29:01 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 24 2015 - 22:36:10 CEST