Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ddff69b9
Commit
ddff69b9
authored
Mar 14, 2007
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 31018 -- move TARGET_xxx in i386.md to tuning options
From-SVN: r122933
parent
d33d6db0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
19 deletions
+62
-19
gcc/config/i386/i386.c
+28
-1
gcc/config/i386/i386.h
+16
-0
gcc/config/i386/i386.md
+18
-18
No files found.
gcc/config/i386/i386.c
View file @
ddff69b9
...
...
@@ -1192,7 +1192,34 @@ unsigned int ix86_tune_features[X86_TUNE_LAST] = {
m_ATHLON_K8_AMDFAM10
|
m_CORE2
|
m_GENERIC
,
/* X86_TUNE_EXT_80387_CONSTANTS */
m_K6_GEODE
|
m_ATHLON_K8
|
m_PENT4
|
m_NOCONA
|
m_PPRO
|
m_CORE2
|
m_GENERIC
m_K6_GEODE
|
m_ATHLON_K8
|
m_PENT4
|
m_NOCONA
|
m_PPRO
|
m_CORE2
|
m_GENERIC
,
/* X86_TUNE_SHORTEN_X87_SSE */
~
m_K8
,
/* X86_TUNE_AVOID_VECTOR_DECODE */
m_K8
|
m_GENERIC64
,
/* X86_TUNE_SLOW_IMUL_IMM32_MEM (imul of 32-bit constant and memory is vector
path on AMD machines) */
m_K8
|
m_GENERIC64
|
m_AMDFAM10
,
/* X86_TUNE_SLOW_IMUL_IMM8 (imul of 8-bit constant is vector path on AMD
machines) */
m_K8
|
m_GENERIC64
|
m_AMDFAM10
,
/* X86_TUNE_MOVE_M1_VIA_OR (on pentiums, it is faster to load -1 via OR than
a MOV) */
m_PENT
,
/* X86_TUNE_NOT_UNPAIRABLE (NOT is not pairable on Pentium, while XOR is, but
one byte longer). */
m_PENT
,
/* X86_TUNE_NOT_VECTORMODE (On AMD K6, NOT is vector decoded with memory
operand that cannot be represented using a modRM byte. The XOR
replacement is long decoded, so this split helps here as well). */
m_K6
,
};
/* Feature tests against the various architecture variations. */
...
...
gcc/config/i386/i386.h
View file @
ddff69b9
...
...
@@ -233,6 +233,13 @@ enum ix86_tune_indices {
X86_TUNE_USE_INCDEC
,
X86_TUNE_PAD_RETURNS
,
X86_TUNE_EXT_80387_CONSTANTS
,
X86_TUNE_SHORTEN_X87_SSE
,
X86_TUNE_AVOID_VECTOR_DECODE
,
X86_TUNE_SLOW_IMUL_IMM32_MEM
,
X86_TUNE_SLOW_IMUL_IMM8
,
X86_TUNE_MOVE_M1_VIA_OR
,
X86_TUNE_NOT_UNPAIRABLE
,
X86_TUNE_NOT_VECTORMODE
,
X86_TUNE_LAST
};
...
...
@@ -302,6 +309,15 @@ extern unsigned int ix86_tune_features[X86_TUNE_LAST];
#define TARGET_PAD_RETURNS ix86_tune_features[X86_TUNE_PAD_RETURNS]
#define TARGET_EXT_80387_CONSTANTS \
ix86_tune_features[X86_TUNE_EXT_80387_CONSTANTS]
#define TARGET_SHORTEN_X87_SSE ix86_tune_features[X86_TUNE_SHORTEN_X87_SSE]
#define TARGET_AVOID_VECTOR_DECODE \
ix86_tune_features[X86_TUNE_AVOID_VECTOR_DECODE]
#define TARGET_SLOW_IMUL_IMM32_MEM \
ix86_tune_features[X86_TUNE_SLOW_IMUL_IMM32_MEM]
#define TARGET_SLOW_IMUL_IMM8 ix86_tune_features[X86_TUNE_SLOW_IMUL_IMM8]
#define TARGET_MOVE_M1_VIA_OR ix86_tune_features[X86_TUNE_MOVE_M1_VIA_OR]
#define TARGET_NOT_UNPAIRABLE ix86_tune_features[X86_TUNE_NOT_UNPAIRABLE]
#define TARGET_NOT_VECTORMODE ix86_tune_features[X86_TUNE_NOT_VECTORMODE]
/* Feature tests against the various architecture variations. */
enum
ix86_arch_indices
{
...
...
gcc/config/i386/i386.md
View file @
ddff69b9
...
...
@@ -1182,7 +1182,7 @@
(clobber (reg:CC FLAGS_REG))]
"reload_completed
&& operands[1] == constm1_rtx
&& (TARGET_
PENTIUM
|| optimize_size)"
&& (TARGET_
MOVE_M1_VIA_OR
|| optimize_size)"
{
operands[1] = constm1_rtx;
return "or{l}\t{%1, %0|%0, %1}";
...
...
@@ -1974,7 +1974,7 @@
[(set (match_operand:DI 0 "register_operand" "=r")
(match_operand:DI 1 "const_int_operand" "i"))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && (TARGET_
PENTIUM
|| optimize_size)
"TARGET_64BIT && (TARGET_
MOVE_M1_VIA_OR
|| optimize_size)
&& reload_completed
&& operands[1] == constm1_rtx"
{
...
...
@@ -4433,7 +4433,7 @@
(match_operand:SSEMODEF 1 "memory_operand" ""))
(set (match_operand:SSEMODEI24 2 "register_operand" "")
(fix:SSEMODEI24 (match_dup 0)))]
"
!TARGET_K8
"
TARGET_SHORTEN_X87_SSE
&& peep2_reg_dead_p (2, operands[0])"
[(set (match_dup 2) (fix:SSEMODEI24 (match_dup 1)))]
"")
...
...
@@ -4443,7 +4443,7 @@
[(match_scratch:DF 2 "Y2")
(set (match_operand:SSEMODEI24 0 "register_operand" "")
(fix:SSEMODEI24 (match_operand:DF 1 "memory_operand" "")))]
"
(TARGET_K8 || TARGET_GENERIC64)
&& !optimize_size"
"
TARGET_AVOID_VECTOR_DECODE
&& !optimize_size"
[(set (match_dup 2) (match_dup 1))
(set (match_dup 0) (fix:SSEMODEI24 (match_dup 2)))]
"")
...
...
@@ -4452,7 +4452,7 @@
[(match_scratch:SF 2 "x")
(set (match_operand:SSEMODEI24 0 "register_operand" "")
(fix:SSEMODEI24 (match_operand:SF 1 "memory_operand" "")))]
"
(TARGET_K8 || TARGET_GENERIC64)
&& !optimize_size"
"
TARGET_AVOID_VECTOR_DECODE
&& !optimize_size"
[(set (match_dup 2) (match_dup 1))
(set (match_dup 0) (fix:SSEMODEI24 (match_dup 2)))]
"")
...
...
@@ -20024,10 +20024,10 @@
(not:SI (match_operand:SI 1 "nonimmediate_operand" "")))]
"!optimize_size
&& peep2_regno_dead_p (0, FLAGS_REG)
&& ((TARGET_
PENTIUM
&& ((TARGET_
NOT_UNPAIRABLE
&& (!MEM_P (operands
[
0
]
)
|| !memory_displacement_operand (operands
[
0
]
, SImode)))
|| (TARGET_
K6
&& long_memory_operand (operands
[
0
]
, SImode)))"
|| (TARGET_
NOT_VECTORMODE
&& long_memory_operand (operands
[
0
]
, SImode)))"
[
(parallel
[
(set (match_dup 0)
(xor:SI (match_dup 1) (const_int -1)))
(clobber (reg:CC FLAGS_REG))])]
...
...
@@ -20038,10 +20038,10 @@
(not:HI (match_operand:HI 1 "nonimmediate_operand" "")))]
"!optimize_size
&& peep2_regno_dead_p (0, FLAGS_REG)
&& ((TARGET_
PENTIUM
&& ((TARGET_
NOT_UNPAIRABLE
&& (!MEM_P (operands
[
0
]
)
|| !memory_displacement_operand (operands
[
0
]
, HImode)))
|| (TARGET_
K6
&& long_memory_operand (operands
[
0
]
, HImode)))"
|| (TARGET_
NOT_VECTORMODE
&& long_memory_operand (operands
[
0
]
, HImode)))"
[
(parallel
[
(set (match_dup 0)
(xor:HI (match_dup 1) (const_int -1)))
(clobber (reg:CC FLAGS_REG))])]
...
...
@@ -20052,10 +20052,10 @@
(not:QI (match_operand:QI 1 "nonimmediate_operand" "")))]
"!optimize_size
&& peep2_regno_dead_p (0, FLAGS_REG)
&& ((TARGET_
PENTIUM
&& ((TARGET_
NOT_UNPAIRABLE
&& (!MEM_P (operands
[
0
]
)
|| !memory_displacement_operand (operands
[
0
]
, QImode)))
|| (TARGET_
K6
&& long_memory_operand (operands
[
0
]
, QImode)))"
|| (TARGET_
NOT_VECTORMODE
&& long_memory_operand (operands
[
0
]
, QImode)))"
[
(parallel
[
(set (match_dup 0)
(xor:QI (match_dup 1) (const_int -1)))
(clobber (reg:CC FLAGS_REG))])]
...
...
@@ -20237,7 +20237,7 @@
"(GET_MODE (operands
[
0
]
) == HImode
|| GET_MODE (operands
[
0
]
) == SImode
|| (GET_MODE (operands
[
0
]
) == DImode && TARGET_64BIT))
&& (optimize_size || TARGET_
PENTIUM
)
&& (optimize_size || TARGET_
MOVE_M1_VIA_OR
)
&& peep2_regno_dead_p (0, FLAGS_REG)"
[
(parallel
[
(set (match_dup 0) (const_int -1))
(clobber (reg:CC FLAGS_REG))])]
...
...
@@ -20641,7 +20641,7 @@
(mult:DI (match_operand:DI 1 "memory_operand" "")
(match_operand:DI 2 "immediate_operand" "")))
(clobber (reg:CC FLAGS_REG))])]
"
(TARGET_K8 || TARGET_GENERIC64 || TARGET_AMDFAM10)
&& !optimize_size
"
TARGET_SLOW_IMUL_IMM32_MEM
&& !optimize_size
&& !satisfies_constraint_K (operands
[
2
]
)"
[
(set (match_dup 3) (match_dup 1))
(parallel
[
(set (match_dup 0) (mult:DI (match_dup 3) (match_dup 2)))
...
...
@@ -20654,7 +20654,7 @@
(mult:SI (match_operand:SI 1 "memory_operand" "")
(match_operand:SI 2 "immediate_operand" "")))
(clobber (reg:CC FLAGS_REG))])]
"
(TARGET_K8 || TARGET_GENERIC64 || TARGET_AMDFAM10)
&& !optimize_size
"
TARGET_SLOW_IMUL_IMM32_MEM
&& !optimize_size
&& !satisfies_constraint_K (operands
[
2
]
)"
[
(set (match_dup 3) (match_dup 1))
(parallel
[
(set (match_dup 0) (mult:SI (match_dup 3) (match_dup 2)))
...
...
@@ -20668,7 +20668,7 @@
(mult:SI (match_operand:SI 1 "memory_operand" "")
(match_operand:SI 2 "immediate_operand" ""))))
(clobber (reg:CC FLAGS_REG))])]
"
(TARGET_K8 || TARGET_GENERIC64 || TARGET_AMDFAM10)
&& !optimize_size
"
TARGET_SLOW_IMUL_IMM32_MEM
&& !optimize_size
&& !satisfies_constraint_K (operands
[
2
]
)"
[
(set (match_dup 3) (match_dup 1))
(parallel
[
(set (match_dup 0) (zero_extend:DI (mult:SI (match_dup 3) (match_dup 2))))
...
...
@@ -20685,7 +20685,7 @@
(match_operand:DI 2 "const_int_operand" "")))
(clobber (reg:CC FLAGS_REG))])
(match_scratch:DI 3 "r")]
"
(TARGET_K8 || TARGET_GENERIC64 || TARGET_AMDFAM10)
&& !optimize_size
"
TARGET_SLOW_IMUL_IMM8
&& !optimize_size
&& satisfies_constraint_K (operands
[
2
]
)"
[
(set (match_dup 3) (match_dup 2))
(parallel
[
(set (match_dup 0) (mult:DI (match_dup 0) (match_dup 3)))
...
...
@@ -20701,7 +20701,7 @@
(match_operand:SI 2 "const_int_operand" "")))
(clobber (reg:CC FLAGS_REG))])
(match_scratch:SI 3 "r")]
"
(TARGET_K8 || TARGET_GENERIC64 || TARGET_AMDFAM10)
&& !optimize_size
"
TARGET_SLOW_IMUL_IMM8
&& !optimize_size
&& satisfies_constraint_K (operands
[
2
]
)"
[
(set (match_dup 3) (match_dup 2))
(parallel
[
(set (match_dup 0) (mult:SI (match_dup 0) (match_dup 3)))
...
...
@@ -20717,7 +20717,7 @@
(match_operand:HI 2 "immediate_operand" "")))
(clobber (reg:CC FLAGS_REG))])
(match_scratch:HI 3 "r")]
"
(TARGET_K8 || TARGET_GENERIC64 || TARGET_AMDFAM10)
&& !optimize_size"
"
TARGET_SLOW_IMUL_IMM8
&& !optimize_size"
[
(set (match_dup 3) (match_dup 2))
(parallel
[
(set (match_dup 0) (mult:HI (match_dup 0) (match_dup 3)))
(clobber (reg:CC FLAGS_REG))])]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment