summaryrefslogtreecommitdiff
path: root/src/cmd/5a
diff options
context:
space:
mode:
authorShenghou Ma <minux.ma@gmail.com>2013-05-30 03:03:52 +0800
committerShenghou Ma <minux.ma@gmail.com>2013-05-30 03:03:52 +0800
commitd3512712a469121491357de0be053966a66a4bcd (patch)
treeb737d065232cb8d387716ffec36fd583a1bf999c /src/cmd/5a
parentf2cf612ba57b67f207b245e3195e129e36492406 (diff)
downloadgo-d3512712a469121491357de0be053966a66a4bcd.tar.gz
cmd/5a, cmd/dist, runtime: support m/g in the assembler, drop support for R9/R10
to avoid unintentionally clobber R9/R10. Thanks Lucio for the suggestion. PS: yes, this could be considered a big change (but not an API change), but as it turns out even temporarily changes R9/R10 in user code is unsafe and leads to very hard to diagnose problems later, better to disable using R9/R10 when the user first uses it. See CL 6300043 and CL 6305100 for two problems caused by misusing R9/R10. R=golang-dev, khr, rsc CC=golang-dev https://codereview.appspot.com/9840043
Diffstat (limited to 'src/cmd/5a')
-rw-r--r--src/cmd/5a/lex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/5a/lex.c b/src/cmd/5a/lex.c
index a77e3050d..3ce1bfe95 100644
--- a/src/cmd/5a/lex.c
+++ b/src/cmd/5a/lex.c
@@ -191,8 +191,8 @@ struct
"R6", LREG, 6,
"R7", LREG, 7,
"R8", LREG, 8,
- "R9", LREG, 9,
- "R10", LREG, 10,
+ "m", LREG, 9, // avoid unintentionally clobber m/g using R9/R10
+ "g", LREG, 10,
"R11", LREG, 11,
"R12", LREG, 12,
"R13", LREG, 13,