]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/5l: use guaranteed undefined instruction for UNDEF to match [68]l.
authorShenghou Ma <minux.ma@gmail.com>
Mon, 10 Jun 2013 18:02:42 +0000 (02:02 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 10 Jun 2013 18:02:42 +0000 (02:02 +0800)
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/10085050

src/cmd/5l/asm.c

index a1220a38e60195c52daf8d730a5bccb07a4708d4..808f1030d2ba25fa1b246fc8e3b2daf249172bef 100644 (file)
@@ -1515,11 +1515,9 @@ if(debug['G']) print("%ux: %s: arm %d\n", (uint32)(p->pc), p->from.sym->name, p-
                // This is supposed to be something that stops execution.
                // It's not supposed to be reached, ever, but if it is, we'd
                // like to be able to tell how we got there.  Assemble as
-               //      BL $0
-               // TODO: Use addrel.
-               v = (0 - pc) - 8;
-               o1 = opbra(ABL, C_SCOND_NONE);
-               o1 |= (v >> 2) & 0xffffff;
+               // 0xf7fabcfd which is guranteed to raise undefined instruction
+               // exception.
+               o1 = 0xf7fabcfd;
                break;
        case 97:        /* CLZ Rm, Rd */
                o1 = oprrr(p->as, p->scond);