ref: 8ae1031043e527a86ee96bb6740f10078314583a
parent: b17f870636b9dea46db7f76c0f69be3192267e19
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed May 14 11:53:43 EDT 2014
Move unode convert functions to code.c
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -223,9 +223,6 @@
*symcode(Symbol *sym),
*fieldcode(Node *child, struct field *fp);
-#define SYM(s) ((union unode) {.sym = s})
-#define OP(s) ((union unode) {.op = s})
-#define TYP(s) ((union unode) {.type = s})
#define NEGATE(n, v) ((n)->u.op ^= (v))
/* TODO: remove some of these ugly macros */
#define ISNODEBIN(n) ((n)->code == emitbin)
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -5,6 +5,9 @@
#include <cc.h>
#include "cc1.h"
+#define SYM(s) ((union unode) {.sym = s})
+#define TYP(s) ((union unode) {.type = s})
+#define OP(s) ((union unode) {.op = s})
#define FIELD(s) ((union unode) {.field = s})
char *opcodes[] = {