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

« back to all changes in this revision

Viewing changes to src/cmd/6a/lex.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
        "BSRL",         LTYPE3, ABSRL,
341
341
        "BSRQ",         LTYPE3, ABSRQ,
342
342
        "BSRW",         LTYPE3, ABSRW,
 
343
        "BSWAPL",       LTYPE1, ABSWAPL,
 
344
        "BSWAPQ",       LTYPE1, ABSWAPQ,
343
345
        "BTCL",         LTYPE3, ABTCL,
344
346
        "BTCQ",         LTYPE3, ABTCQ,
345
347
        "BTCW",         LTYPE3, ABTCW,
930
932
        "PCMPGTW",      LTYPE3, APCMPGTW,
931
933
        "PEXTRW",       LTYPEX, APEXTRW,
932
934
        "PINSRW",       LTYPEX, APINSRW,
 
935
        "PINSRD",       LTYPEX, APINSRD,
 
936
        "PINSRQ",       LTYPEX, APINSRQ,
933
937
        "PMADDWL",      LTYPE3, APMADDWL,
934
938
        "PMAXSW",       LTYPE3, APMAXSW,
935
939
        "PMAXUB",       LTYPE3, APMAXUB,
947
951
        "PSHUFL",       LTYPEX, APSHUFL,
948
952
        "PSHUFLW",      LTYPEX, APSHUFLW,
949
953
        "PSHUFW",       LTYPEX, APSHUFW,
 
954
        "PSHUFB",       LTYPEM, APSHUFB,
950
955
        "PSLLO",        LTYPE3, APSLLO,
951
956
        "PSLLDQ",       LTYPE3, APSLLO, /* syn */
952
957
        "PSLLL",        LTYPE3, APSLLL,
1001
1006
        "XORPS",        LTYPE3, AXORPS,
1002
1007
        "CRC32B",       LTYPE4, ACRC32B,
1003
1008
        "CRC32Q",       LTYPE4, ACRC32Q,
 
1009
        "PREFETCHT0",           LTYPE2, APREFETCHT0,
 
1010
        "PREFETCHT1",           LTYPE2, APREFETCHT1,
 
1011
        "PREFETCHT2",           LTYPE2, APREFETCHT2,
 
1012
        "PREFETCHNTA",          LTYPE2, APREFETCHNTA,
 
1013
        "UNDEF",        LTYPE0, AUNDEF,
 
1014
        "AESENC",       LTYPE3, AAESENC,
 
1015
        "AESENCLAST",   LTYPE3, AAESENCLAST,
 
1016
        "AESDEC",       LTYPE3, AAESDEC,
 
1017
        "AESDECLAST",   LTYPE3, AAESDECLAST,
 
1018
        "AESIMC",       LTYPE3, AAESIMC,
 
1019
        "AESKEYGENASSIST", LTYPEX, AAESKEYGENASSIST,
 
1020
        "PSHUFD",       LTYPEX, APSHUFD,
 
1021
        "USEFIELD",     LTYPEN, AUSEFIELD,
1004
1022
 
1005
1023
        0
1006
1024
};
1250
1268
        Hist *h;
1251
1269
        char *p, *q, *op, c;
1252
1270
        int n;
 
1271
        char *tofree;
 
1272
        static int first = 1;
 
1273
        static char *goroot, *goroot_final;
 
1274
 
 
1275
        if(first) {
 
1276
                // Decide whether we need to rewrite paths from $GOROOT to $GOROOT_FINAL.
 
1277
                first = 0;
 
1278
                goroot = getenv("GOROOT");
 
1279
                goroot_final = getenv("GOROOT_FINAL");
 
1280
                if(goroot == nil)
 
1281
                        goroot = "";
 
1282
                if(goroot_final == nil)
 
1283
                        goroot_final = goroot;
 
1284
                if(strcmp(goroot, goroot_final) == 0) {
 
1285
                        goroot = nil;
 
1286
                        goroot_final = nil;
 
1287
                }
 
1288
        }
 
1289
 
 
1290
        tofree = nil;
1253
1291
 
1254
1292
        g = nullgen;
1255
1293
        c = pathchar();
1256
1294
        for(h = hist; h != H; h = h->link) {
1257
1295
                p = h->name;
 
1296
                if(p != nil && goroot != nil) {
 
1297
                        n = strlen(goroot);
 
1298
                        if(strncmp(p, goroot, strlen(goroot)) == 0 && p[n] == '/') {
 
1299
                                tofree = smprint("%s%s", goroot_final, p+n);
 
1300
                                p = tofree;
 
1301
                        }
 
1302
                }
1258
1303
                op = 0;
1259
1304
                if(systemtype(Windows) && p && p[1] == ':'){
1260
1305
                        c = p[2];
1306
1351
                Bputc(&obuf, h->line>>24);
1307
1352
                zaddr(&nullgen, 0);
1308
1353
                zaddr(&g, 0);
 
1354
 
 
1355
                if(tofree) {
 
1356
                        free(tofree);
 
1357
                        tofree = nil;
 
1358
                }
1309
1359
        }
1310
1360
}
1311
1361
 
1312
 
void
1313
 
pragbldicks(void)
1314
 
{
1315
 
        while(getnsc() != '\n')
1316
 
                ;
1317
 
}
1318
 
 
1319
 
void
1320
 
praghjdicks(void)
1321
 
{
1322
 
        while(getnsc() != '\n')
1323
 
                ;
1324
 
}
1325
 
 
1326
1362
#include "../cc/lexbody"
1327
1363
#include "../cc/macbody"