diff options
| author | Russ Cox <rsc@golang.org> | 2012-05-30 16:47:56 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2012-05-30 16:47:56 -0400 |
| commit | f2bd3a977d105f8a4ee3f4c86fe8daf52f629495 (patch) | |
| tree | 921e6cab9c4fd97d7106ebf07e8fbe7422d7797c /src/cmd/8l | |
| parent | 8820ab5da9da5528e256d3a519723fdf44ddc75f (diff) | |
| download | go-f2bd3a977d105f8a4ee3f4c86fe8daf52f629495.tar.xz | |
cmd/6l, cmd/8l, cmd/5l: add AUNDEF instruction
On 6l and 8l, this is a real instruction, guaranteed to
cause an 'undefined instruction' exception.
On 5l, we simulate it as BL to address 0.
The plan is to use it as a signal to the linker that this
point in the instruction stream cannot be reached
(hence the changes to nofollow). This will help the
compiler explain that panicindex and friends do not
return without having to put a list of these functions
in the linker.
R=ken2
CC=golang-dev
https://golang.org/cl/6255064
Diffstat (limited to 'src/cmd/8l')
| -rw-r--r-- | src/cmd/8l/8.out.h | 2 | ||||
| -rw-r--r-- | src/cmd/8l/optab.c | 2 | ||||
| -rw-r--r-- | src/cmd/8l/pass.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/8l/8.out.h b/src/cmd/8l/8.out.h index 8329f4a6da..924ba93901 100644 --- a/src/cmd/8l/8.out.h +++ b/src/cmd/8l/8.out.h @@ -458,6 +458,8 @@ enum as APREFETCHNTA, ABSWAPL, + + AUNDEF, ALAST }; diff --git a/src/cmd/8l/optab.c b/src/cmd/8l/optab.c index 81fe25d042..7a588fca49 100644 --- a/src/cmd/8l/optab.c +++ b/src/cmd/8l/optab.c @@ -779,6 +779,8 @@ Optab optab[] = { APREFETCHNTA, yprefetch, Pm, 0x18,(00) }, { ABSWAPL, ybswap, Pm, 0xc8 }, + + { AUNDEF, ynone, Px, 0x0f, 0x0b }, 0 }; diff --git a/src/cmd/8l/pass.c b/src/cmd/8l/pass.c index 9704e3530e..27d8d4ee2a 100644 --- a/src/cmd/8l/pass.c +++ b/src/cmd/8l/pass.c @@ -75,6 +75,7 @@ nofollow(int a) case ARET: case AIRETL: case AIRETW: + case AUNDEF: return 1; } return 0; |
