~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/cmd/8a/a.y

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-11-18 15:12:26 UTC
  • mfrom: (14.2.12 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20141118151226-zug7vn93mn3dtiz3
Tags: 2:1.3.2-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - Support co-installability with gccgo-go tool:
    - d/rules,golang-go.install: Rename bin/go -> bin/golang-go
    - d/golang-go.{postinst,prerm}: Install/remove /usr/bin/go using
      alternatives.
  - d/copyright: Amendments for full compiliance with copyright format.
  - d/control: Demote golang-go.tools to Suggests to support Ubuntu MIR.
  - dropped patches (now upstream):
    - d/p/issue27650045_40001_50001.diff
    - d/p/issue28050043_60001_70001.diff
    - d/p/issue54790044_100001_110001.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        } con2;
45
45
        double  dval;
46
46
        char    sval[8];
47
 
        Gen     gen;
48
 
        Gen2    gen2;
 
47
        Addr    addr;
 
48
        Addr2   addr2;
49
49
}
50
50
%left   '|'
51
51
%left   '^'
62
62
%token  <sym>   LNAME LLAB LVAR
63
63
%type   <lval>  con expr pointer offset
64
64
%type   <con2>  con2
65
 
%type   <gen>   mem imm imm2 reg nam rel rem rim rom omem nmem
66
 
%type   <gen2>  nonnon nonrel nonrem rimnon rimrem remrim
67
 
%type   <gen2>  spec1 spec2 spec3 spec4 spec5 spec6 spec7 spec8 spec9 spec10 spec11 spec12
 
65
%type   <addr>  mem imm imm2 reg nam rel rem rim rom omem nmem
 
66
%type   <addr2> nonnon nonrel nonrem rimnon rimrem remrim
 
67
%type   <addr2> spec1 spec2 spec3 spec4 spec5 spec6 spec7 spec8 spec9 spec10 spec11 spec12
68
68
%%
69
69
prog:
70
70
|       prog
366
366
                if(pass == 2)
367
367
                        yyerror("undefined label: %s", $1->name);
368
368
                $$.type = D_BRANCH;
369
 
                $$.sym = $1;
370
369
                $$.offset = $2;
371
370
        }
372
371
|       LLAB offset
373
372
        {
374
373
                $$ = nullgen;
375
374
                $$.type = D_BRANCH;
376
 
                $$.sym = $1;
377
375
                $$.offset = $1->value + $2;
378
376
        }
379
377
 
431
429
        {
432
430
                $$ = nullgen;
433
431
                $$.type = D_SCONST;
434
 
                memcpy($$.sval, $2, sizeof($$.sval));
 
432
                memcpy($$.u.sval, $2, sizeof($$.u.sval));
435
433
        }
436
434
|       '$' LFCONST
437
435
        {
438
436
                $$ = nullgen;
439
437
                $$.type = D_FCONST;
440
 
                $$.dval = $2;
 
438
                $$.u.dval = $2;
441
439
        }
442
440
|       '$' '(' LFCONST ')'
443
441
        {
444
442
                $$ = nullgen;
445
443
                $$.type = D_FCONST;
446
 
                $$.dval = $3;
 
444
                $$.u.dval = $3;
447
445
        }
448
446
|       '$' '(' '-' LFCONST ')'
449
447
        {
450
448
                $$ = nullgen;
451
449
                $$.type = D_FCONST;
452
 
                $$.dval = -$4;
 
450
                $$.u.dval = -$4;
453
451
        }
454
452
|       '$' '-' LFCONST
455
453
        {
456
454
                $$ = nullgen;
457
455
                $$.type = D_FCONST;
458
 
                $$.dval = -$3;
 
456
                $$.u.dval = -$3;
459
457
        }
460
458
 
461
459
imm2:
590
588
        {
591
589
                $$ = nullgen;
592
590
                $$.type = $4;
593
 
                $$.sym = $1;
 
591
                $$.sym = linklookup(ctxt, $1->name, 0);
594
592
                $$.offset = $2;
595
593
        }
596
594
|       LNAME '<' '>' offset '(' LSB ')'
597
595
        {
598
596
                $$ = nullgen;
599
597
                $$.type = D_STATIC;
600
 
                $$.sym = $1;
 
598
                $$.sym = linklookup(ctxt, $1->name, 1);
601
599
                $$.offset = $4;
602
600
        }
603
601