mirror of
https://github.com/golang/go
synced 2024-11-22 19:34:59 -07:00
cmd/8a: add SSE2 instructions
R=ken CC=golang-dev https://golang.org/cl/6614063
This commit is contained in:
parent
c1d06cef12
commit
5da37c0901
@ -53,7 +53,7 @@
|
||||
%left '+' '-'
|
||||
%left '*' '/' '%'
|
||||
%token <lval> LTYPE0 LTYPE1 LTYPE2 LTYPE3 LTYPE4
|
||||
%token <lval> LTYPEC LTYPED LTYPEN LTYPER LTYPET LTYPES LTYPEM LTYPEI LTYPEG
|
||||
%token <lval> LTYPEC LTYPED LTYPEN LTYPER LTYPET LTYPES LTYPEM LTYPEI LTYPEG LTYPEXC
|
||||
%token <lval> LCONST LFP LPC LSB
|
||||
%token <lval> LBREG LLREG LSREG LFREG
|
||||
%token <dval> LFCONST
|
||||
@ -63,7 +63,7 @@
|
||||
%type <con2> con2
|
||||
%type <gen> mem imm imm2 reg nam rel rem rim rom omem nmem
|
||||
%type <gen2> nonnon nonrel nonrem rimnon rimrem remrim
|
||||
%type <gen2> spec1 spec2 spec3 spec4 spec5 spec6 spec7 spec8
|
||||
%type <gen2> spec1 spec2 spec3 spec4 spec5 spec6 spec7 spec8 spec9
|
||||
%%
|
||||
prog:
|
||||
| prog
|
||||
@ -116,6 +116,7 @@ inst:
|
||||
| LTYPEM spec6 { outcode($1, &$2); }
|
||||
| LTYPEI spec7 { outcode($1, &$2); }
|
||||
| LTYPEG spec8 { outcode($1, &$2); }
|
||||
| LTYPEXC spec9 { outcode($1, &$2); }
|
||||
|
||||
nonnon:
|
||||
{
|
||||
@ -287,6 +288,14 @@ spec8: /* GLOBL */
|
||||
$$.to = $5;
|
||||
}
|
||||
|
||||
spec9: /* CMPPS/CMPPD */
|
||||
reg ',' rem ',' con
|
||||
{
|
||||
$$.from = $1;
|
||||
$$.to = $3;
|
||||
$$.to.offset = $5;
|
||||
}
|
||||
|
||||
rem:
|
||||
reg
|
||||
| mem
|
||||
|
108
src/cmd/8a/lex.c
108
src/cmd/8a/lex.c
@ -674,6 +674,114 @@ struct
|
||||
"PREFETCHNTA", LTYPE2, APREFETCHNTA,
|
||||
"UNDEF", LTYPE0, AUNDEF,
|
||||
|
||||
"ADDPD", LTYPE3, AADDPD,
|
||||
"ADDPS", LTYPE3, AADDPS,
|
||||
"ADDSD", LTYPE3, AADDSD,
|
||||
"ADDSS", LTYPE3, AADDSS,
|
||||
"ANDNPD", LTYPE3, AANDNPD,
|
||||
"ANDNPS", LTYPE3, AANDNPS,
|
||||
"ANDPD", LTYPE3, AANDPD,
|
||||
"ANDPS", LTYPE3, AANDPS,
|
||||
"CMPPD", LTYPEXC,ACMPPD,
|
||||
"CMPPS", LTYPEXC,ACMPPS,
|
||||
"CMPSD", LTYPEXC,ACMPSD,
|
||||
"CMPSS", LTYPEXC,ACMPSS,
|
||||
"COMISD", LTYPE3, ACOMISD,
|
||||
"COMISS", LTYPE3, ACOMISS,
|
||||
"CVTPL2PD", LTYPE3, ACVTPL2PD,
|
||||
"CVTPL2PS", LTYPE3, ACVTPL2PS,
|
||||
"CVTPD2PL", LTYPE3, ACVTPD2PL,
|
||||
"CVTPD2PS", LTYPE3, ACVTPD2PS,
|
||||
"CVTPS2PL", LTYPE3, ACVTPS2PL,
|
||||
"CVTPS2PD", LTYPE3, ACVTPS2PD,
|
||||
"CVTSD2SL", LTYPE3, ACVTSD2SL,
|
||||
"CVTSD2SS", LTYPE3, ACVTSD2SS,
|
||||
"CVTSL2SD", LTYPE3, ACVTSL2SD,
|
||||
"CVTSL2SS", LTYPE3, ACVTSL2SS,
|
||||
"CVTSS2SD", LTYPE3, ACVTSS2SD,
|
||||
"CVTSS2SL", LTYPE3, ACVTSS2SL,
|
||||
"CVTTPD2PL", LTYPE3, ACVTTPD2PL,
|
||||
"CVTTPS2PL", LTYPE3, ACVTTPS2PL,
|
||||
"CVTTSD2SL", LTYPE3, ACVTTSD2SL,
|
||||
"CVTTSS2SL", LTYPE3, ACVTTSS2SL,
|
||||
"DIVPD", LTYPE3, ADIVPD,
|
||||
"DIVPS", LTYPE3, ADIVPS,
|
||||
"DIVSD", LTYPE3, ADIVSD,
|
||||
"DIVSS", LTYPE3, ADIVSS,
|
||||
"MASKMOVOU", LTYPE3, AMASKMOVOU,
|
||||
"MASKMOVDQU", LTYPE3, AMASKMOVOU, /* syn */
|
||||
"MAXPD", LTYPE3, AMAXPD,
|
||||
"MAXPS", LTYPE3, AMAXPS,
|
||||
"MAXSD", LTYPE3, AMAXSD,
|
||||
"MAXSS", LTYPE3, AMAXSS,
|
||||
"MINPD", LTYPE3, AMINPD,
|
||||
"MINPS", LTYPE3, AMINPS,
|
||||
"MINSD", LTYPE3, AMINSD,
|
||||
"MINSS", LTYPE3, AMINSS,
|
||||
"MOVAPD", LTYPE3, AMOVAPD,
|
||||
"MOVAPS", LTYPE3, AMOVAPS,
|
||||
"MOVO", LTYPE3, AMOVO,
|
||||
"MOVOA", LTYPE3, AMOVO, /* syn */
|
||||
"MOVOU", LTYPE3, AMOVOU,
|
||||
"MOVHLPS", LTYPE3, AMOVHLPS,
|
||||
"MOVHPD", LTYPE3, AMOVHPD,
|
||||
"MOVHPS", LTYPE3, AMOVHPS,
|
||||
"MOVLHPS", LTYPE3, AMOVLHPS,
|
||||
"MOVLPD", LTYPE3, AMOVLPD,
|
||||
"MOVLPS", LTYPE3, AMOVLPS,
|
||||
"MOVMSKPD", LTYPE3, AMOVMSKPD,
|
||||
"MOVMSKPS", LTYPE3, AMOVMSKPS,
|
||||
"MOVNTO", LTYPE3, AMOVNTO,
|
||||
"MOVNTDQ", LTYPE3, AMOVNTO, /* syn */
|
||||
"MOVNTPD", LTYPE3, AMOVNTPD,
|
||||
"MOVNTPS", LTYPE3, AMOVNTPS,
|
||||
"MOVSD", LTYPE3, AMOVSD,
|
||||
"MOVSS", LTYPE3, AMOVSS,
|
||||
"MOVUPD", LTYPE3, AMOVUPD,
|
||||
"MOVUPS", LTYPE3, AMOVUPS,
|
||||
"MULPD", LTYPE3, AMULPD,
|
||||
"MULPS", LTYPE3, AMULPS,
|
||||
"MULSD", LTYPE3, AMULSD,
|
||||
"MULSS", LTYPE3, AMULSS,
|
||||
"ORPD", LTYPE3, AORPD,
|
||||
"ORPS", LTYPE3, AORPS,
|
||||
"PADDQ", LTYPE3, APADDQ,
|
||||
"PMAXSW", LTYPE3, APMAXSW,
|
||||
"PMAXUB", LTYPE3, APMAXUB,
|
||||
"PMINSW", LTYPE3, APMINSW,
|
||||
"PMINUB", LTYPE3, APMINUB,
|
||||
"PSADBW", LTYPE3, APSADBW,
|
||||
"PSUBB", LTYPE3, APSUBB,
|
||||
"PSUBL", LTYPE3, APSUBL,
|
||||
"PSUBQ", LTYPE3, APSUBQ,
|
||||
"PSUBSB", LTYPE3, APSUBSB,
|
||||
"PSUBSW", LTYPE3, APSUBSW,
|
||||
"PSUBUSB", LTYPE3, APSUBUSB,
|
||||
"PSUBUSW", LTYPE3, APSUBUSW,
|
||||
"PSUBW", LTYPE3, APSUBW,
|
||||
"PUNPCKHQDQ", LTYPE3, APUNPCKHQDQ,
|
||||
"PUNPCKLQDQ", LTYPE3, APUNPCKLQDQ,
|
||||
"RCPPS", LTYPE3, ARCPPS,
|
||||
"RCPSS", LTYPE3, ARCPSS,
|
||||
"RSQRTPS", LTYPE3, ARSQRTPS,
|
||||
"RSQRTSS", LTYPE3, ARSQRTSS,
|
||||
"SQRTPD", LTYPE3, ASQRTPD,
|
||||
"SQRTPS", LTYPE3, ASQRTPS,
|
||||
"SQRTSD", LTYPE3, ASQRTSD,
|
||||
"SQRTSS", LTYPE3, ASQRTSS,
|
||||
"SUBPD", LTYPE3, ASUBPD,
|
||||
"SUBPS", LTYPE3, ASUBPS,
|
||||
"SUBSD", LTYPE3, ASUBSD,
|
||||
"SUBSS", LTYPE3, ASUBSS,
|
||||
"UCOMISD", LTYPE3, AUCOMISD,
|
||||
"UCOMISS", LTYPE3, AUCOMISS,
|
||||
"UNPCKHPD", LTYPE3, AUNPCKHPD,
|
||||
"UNPCKHPS", LTYPE3, AUNPCKHPS,
|
||||
"UNPCKLPD", LTYPE3, AUNPCKLPD,
|
||||
"UNPCKLPS", LTYPE3, AUNPCKLPS,
|
||||
"XORPD", LTYPE3, AXORPD,
|
||||
"XORPS", LTYPE3, AXORPS,
|
||||
|
||||
0
|
||||
};
|
||||
|
||||
|
1589
src/cmd/8a/y.tab.c
1589
src/cmd/8a/y.tab.c
File diff suppressed because it is too large
Load Diff
@ -1,24 +1,23 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
|
||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
@ -29,10 +28,11 @@
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
@ -53,20 +53,21 @@
|
||||
LTYPEM = 269,
|
||||
LTYPEI = 270,
|
||||
LTYPEG = 271,
|
||||
LCONST = 272,
|
||||
LFP = 273,
|
||||
LPC = 274,
|
||||
LSB = 275,
|
||||
LBREG = 276,
|
||||
LLREG = 277,
|
||||
LSREG = 278,
|
||||
LFREG = 279,
|
||||
LFCONST = 280,
|
||||
LSCONST = 281,
|
||||
LSP = 282,
|
||||
LNAME = 283,
|
||||
LLAB = 284,
|
||||
LVAR = 285
|
||||
LTYPEXC = 272,
|
||||
LCONST = 273,
|
||||
LFP = 274,
|
||||
LPC = 275,
|
||||
LSB = 276,
|
||||
LBREG = 277,
|
||||
LLREG = 278,
|
||||
LSREG = 279,
|
||||
LFREG = 280,
|
||||
LFCONST = 281,
|
||||
LSCONST = 282,
|
||||
LSP = 283,
|
||||
LNAME = 284,
|
||||
LLAB = 285,
|
||||
LVAR = 286
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
@ -84,28 +85,32 @@
|
||||
#define LTYPEM 269
|
||||
#define LTYPEI 270
|
||||
#define LTYPEG 271
|
||||
#define LCONST 272
|
||||
#define LFP 273
|
||||
#define LPC 274
|
||||
#define LSB 275
|
||||
#define LBREG 276
|
||||
#define LLREG 277
|
||||
#define LSREG 278
|
||||
#define LFREG 279
|
||||
#define LFCONST 280
|
||||
#define LSCONST 281
|
||||
#define LSP 282
|
||||
#define LNAME 283
|
||||
#define LLAB 284
|
||||
#define LVAR 285
|
||||
#define LTYPEXC 272
|
||||
#define LCONST 273
|
||||
#define LFP 274
|
||||
#define LPC 275
|
||||
#define LSB 276
|
||||
#define LBREG 277
|
||||
#define LLREG 278
|
||||
#define LSREG 279
|
||||
#define LFREG 280
|
||||
#define LFCONST 281
|
||||
#define LSCONST 282
|
||||
#define LSP 283
|
||||
#define LNAME 284
|
||||
#define LLAB 285
|
||||
#define LVAR 286
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 37 "a.y"
|
||||
{
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 37 "a.y"
|
||||
|
||||
Sym *sym;
|
||||
int32 lval;
|
||||
struct {
|
||||
@ -116,14 +121,17 @@ typedef union YYSTYPE
|
||||
char sval[8];
|
||||
Gen gen;
|
||||
Gen2 gen2;
|
||||
}
|
||||
/* Line 1529 of yacc.c. */
|
||||
#line 122 "y.tab.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 129 "y.tab.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user