summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-11-18 15:18:52 -0500
committerAustin Clements <austin@google.com>2014-11-18 15:18:52 -0500
commitc971112be543c579d9257d7d6951de0c1d6f9615 (patch)
tree8883501281c8eb350885a47091b2866fd7e1d938 /src/cmd
parentfe96ecf6cb13b2a951e0635d1c5ba768da5427ed (diff)
downloadgo-c971112be543c579d9257d7d6951de0c1d6f9615.tar.gz
[dev.cc] 9a: make RET a synonym for RETURN; use "g" instead of "R30"
Previously, 9a was the only assembler that had a different name for RET, causing unnecessary friction in simple files that otherwise assembled on all architectures. Add RET so these work on 9a. This also renames "R30" to "g" to avoid unintentionally clobbering g in assembly code. This parallels a change made to 5a. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/178030043
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/9a/lex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/9a/lex.c b/src/cmd/9a/lex.c
index 26f21f743..e2945ef89 100644
--- a/src/cmd/9a/lex.c
+++ b/src/cmd/9a/lex.c
@@ -250,7 +250,7 @@ struct
"R27", LREG, 27,
"R28", LREG, 28,
"R29", LREG, 29,
- "R30", LREG, 30,
+ "g", LREG, 30, // avoid unintentionally clobbering g using R30
"R31", LREG, 31,
"F", LF, 0,
@@ -488,6 +488,7 @@ struct
"SYSCALL", LNOP, ASYSCALL,
"UNDEF", LNOP, AUNDEF,
+ "RET", LRETRN, ARETURN,
"RETURN", LRETRN, ARETURN,
"RFI", LRETRN, ARFI,
"RFCI", LRETRN, ARFCI,