X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=assembler%2Fparser.y;h=65bd39dbe1796bbda4c44bf2db9fb0c28236124d;hb=d55478bb22a3ae905775d2394058c37a44c0f940;hp=753be084c1d98925335a3fc4cbec1cfe30750beb;hpb=b9e19faa25ad9e1b24f08dc77267760df1b98504;p=b43-tools.git diff --git a/assembler/parser.y b/assembler/parser.y index 753be08..65bd39d 100644 --- a/assembler/parser.y +++ b/assembler/parser.y @@ -487,8 +487,11 @@ statement : asmdir { ; /* ASM directives */ -asmdir : asmarch { - $$ = $1; +asmdir : ASM_ARCH hexnum_decnum { + struct asmdir *ad = xmalloc(sizeof(struct asmdir)); + ad->type = ADIR_ARCH; + ad->u.arch = (unsigned int)(unsigned long)$2; + $$ = ad; } | ASM_START identifier { struct asmdir *ad = xmalloc(sizeof(struct asmdir)); @@ -501,20 +504,6 @@ asmdir : asmarch { } ; -asmarch : ASM_ARCH ARCH_NEWWORLD { - struct asmdir *ad = xmalloc(sizeof(struct asmdir)); - ad->type = ADIR_ARCH; - ad->u.arch = NEWWORLD; - $$ = ad; - } - | ASM_ARCH ARCH_OLDWORLD { - struct asmdir *ad = xmalloc(sizeof(struct asmdir)); - ad->type = ADIR_ARCH; - ad->u.arch = OLDWORLD; - $$ = ad; - } - ; - label : LABEL { struct label *label = xmalloc(sizeof(struct label)); char *l;