RE: [PATCH] [ARC] Add support for QuarkSE processor.
> > Looks fine. > Committed, thank you for your review, Claudiu
Re: [PATCH] [ARC] Add support for QuarkSE processor.
* Claudiu Zissulescu [2016-11-16 11:30:35 +0100]: > Updated QuarkSE patch. > > Ok to apply? Looks fine. Thanks, Andrew > Claudiu > > gcc/ > 2016-05-25 Claudiu Zissulescu > > * config/arc/arc-arches.def: Add FPX quarkse instruction as valid > for arcem. > * config/arc/arc-c.def (__ARC_FPX_QUARK__): Define. > * config/arc/arc-cpus.def (quarkse_em): Add. > * config/arc/arc-options.def (FL_FPX_QUARK, FL_QUARK): Likewise. > * config/arc/arc-opts.h (FPX_QK): Define. > * config/arc/arc-tables.opt: Regenerate. > * config/arc/arc.c (gen_compare_reg): Change. > (arc_register_move_cost): Avoid Dy,Dx moves. > * config/arc/arc.h (TARGET_HARD_FLOAT): Change. > (TARGET_FPX_QUARK, TARGET_FP_ASSIST): Define. > * config/arc/arc.md (divsf3, sqrtsf2, fix_truncsfsi2, floatsisf2): > New expands. > * config/arc/fpu.md (divsf3_fpu, sqrtsf2_fpu, floatsisf2_fpu) > (fix_truncsfsi2_fpu): Rename. > * config/arc/fpx.md (cmp_quark, cmpsf_quark_, cmpsf_quark_ord) > (cmpsf_quark_uneq, cmpsf_quark_eq, divsf3_quark, sqrtsf2_quark) > (fix_truncsfsi2_quark, floatsisf2_quark): New patterns. > * config/arc/t-multilib: Regenerate. > --- > gcc/config/arc/arc-arches.def | 2 +- > gcc/config/arc/arc-c.def | 1 + > gcc/config/arc/arc-cpus.def| 1 + > gcc/config/arc/arc-options.def | 2 + > gcc/config/arc/arc-opts.h | 2 + > gcc/config/arc/arc-tables.opt | 3 ++ > gcc/config/arc/arc.c | 22 +- > gcc/config/arc/arc.h | 12 +++-- > gcc/config/arc/arc.md | 46 > gcc/config/arc/fpu.md | 6 +-- > gcc/config/arc/fpx.md | 99 > ++ > gcc/config/arc/t-multilib | 4 +- > 12 files changed, 186 insertions(+), 14 deletions(-) > > diff --git a/gcc/config/arc/arc-arches.def b/gcc/config/arc/arc-arches.def > index f24babb..5fd45cd 100644 > --- a/gcc/config/arc/arc-arches.def > +++ b/gcc/config/arc/arc-arches.def > @@ -40,7 +40,7 @@ > > ARC_ARCH ("arcem", em, FL_MPYOPT_1_6 | FL_DIVREM | FL_CD | FL_NORM \ > | FL_BS | FL_SWAP | FL_FPUS | FL_SPFP | FL_DPFP \ > - | FL_SIMD | FL_FPUDA, 0) > + | FL_SIMD | FL_FPUDA | FL_QUARK, 0) > ARC_ARCH ("archs", hs, FL_MPYOPT_7_9 | FL_DIVREM | FL_NORM | FL_CD \ > | FL_ATOMIC | FL_LL64 | FL_BS | FL_SWAP \ > | FL_FPUS | FL_FPUD, \ > diff --git a/gcc/config/arc/arc-c.def b/gcc/config/arc/arc-c.def > index 4cfd7b6..fd64376 100644 > --- a/gcc/config/arc/arc-c.def > +++ b/gcc/config/arc/arc-c.def > @@ -58,6 +58,7 @@ ARC_C_DEF ("__ARC_FPU_DP_DIV__", TARGET_FP_DP_SQRT) > ARC_C_DEF ("__ARC_FPU_SP_FMA__", TARGET_FP_SP_FUSED) > ARC_C_DEF ("__ARC_FPU_DP_FMA__", TARGET_FP_DP_FUSED) > ARC_C_DEF ("__ARC_FPU_ASSIST__", TARGET_FP_DP_AX) > +ARC_C_DEF ("__ARC_FPX_QUARK__", TARGET_FPX_QUARK) > > /* To be deprecated. */ > ARC_C_DEF ("__A6__", TARGET_ARC600) > diff --git a/gcc/config/arc/arc-cpus.def b/gcc/config/arc/arc-cpus.def > index 0ceb734..7200485 100644 > --- a/gcc/config/arc/arc-cpus.def > +++ b/gcc/config/arc/arc-cpus.def > @@ -51,6 +51,7 @@ ARC_CPU (em4, em, FL_CD, NONE) > ARC_CPU (em4_dmips, em, FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS, > NONE) > ARC_CPU (em4_fpus, em, > FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPU_FPUS, NONE) > ARC_CPU (em4_fpuda, em, > FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPU_FPUDA, NONE) > +ARC_CPU (quarkse_em, em, > FL_MPYOPT_3|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPX_QUARK|FL_SPFP|FL_DPFP, > NONE) > > ARC_CPU (hs, hs, 0, NONE) > ARC_CPU (archs, hs, FL_MPYOPT_2|FL_DIVREM|FL_LL64, NONE) > diff --git a/gcc/config/arc/arc-options.def b/gcc/config/arc/arc-options.def > index 0f9d36c..a16637e 100644 > --- a/gcc/config/arc/arc-options.def > +++ b/gcc/config/arc/arc-options.def > @@ -99,10 +99,12 @@ ARC_OPTX (FL_FPU_FPUD,(1ULL << 34), > arc_fpu_build, FPU_FPUD, "mfpu=fpud") > ARC_OPTX (FL_FPU_FPUD_DIV, (1ULL << 35), arc_fpu_build, FPU_FPUD_DIV, > "mfpu=fpud_div") > ARC_OPTX (FL_FPU_FPUD_FMA, (1ULL << 36), arc_fpu_build, FPU_FPUD_FMA, > "mfpu=fpud_fma") > ARC_OPTX (FL_FPU_FPUD_ALL, (1ULL << 37), arc_fpu_build, FPU_FPUD_ALL, > "mfpu=fpud_all") > +ARC_OPTX (FL_FPX_QUARK, (1ULL << 38), arc_fpu_build, FPX_QK, > "quarkse fp") > > ARC_OPT (FL_FPUS, (0xFULL << 26), 0, "single precission floating point") > ARC_OPT (FL_FPUDA, (0xFFULL << 26), 0, "double precission fp assist") > ARC_OPT (FL_FPUD, (0xF0FULL << 26), 0, "double precission floating point") > +ARC_OPT (FL_QUARK, (1ULL << 38), 0, "Quark SE fp extension") > > /* Local Variables: */ > /* mode: c */ > diff --git a/gcc/config/arc/arc-opts.h b/gcc/config/arc/arc-opts.h > index e5bca84..2fd3c34 100644 > --- a/gcc/config/arc/arc-opts.h > ++
[PATCH] [ARC] Add support for QuarkSE processor.
Updated QuarkSE patch. Ok to apply? Claudiu gcc/ 2016-05-25 Claudiu Zissulescu * config/arc/arc-arches.def: Add FPX quarkse instruction as valid for arcem. * config/arc/arc-c.def (__ARC_FPX_QUARK__): Define. * config/arc/arc-cpus.def (quarkse_em): Add. * config/arc/arc-options.def (FL_FPX_QUARK, FL_QUARK): Likewise. * config/arc/arc-opts.h (FPX_QK): Define. * config/arc/arc-tables.opt: Regenerate. * config/arc/arc.c (gen_compare_reg): Change. (arc_register_move_cost): Avoid Dy,Dx moves. * config/arc/arc.h (TARGET_HARD_FLOAT): Change. (TARGET_FPX_QUARK, TARGET_FP_ASSIST): Define. * config/arc/arc.md (divsf3, sqrtsf2, fix_truncsfsi2, floatsisf2): New expands. * config/arc/fpu.md (divsf3_fpu, sqrtsf2_fpu, floatsisf2_fpu) (fix_truncsfsi2_fpu): Rename. * config/arc/fpx.md (cmp_quark, cmpsf_quark_, cmpsf_quark_ord) (cmpsf_quark_uneq, cmpsf_quark_eq, divsf3_quark, sqrtsf2_quark) (fix_truncsfsi2_quark, floatsisf2_quark): New patterns. * config/arc/t-multilib: Regenerate. --- gcc/config/arc/arc-arches.def | 2 +- gcc/config/arc/arc-c.def | 1 + gcc/config/arc/arc-cpus.def| 1 + gcc/config/arc/arc-options.def | 2 + gcc/config/arc/arc-opts.h | 2 + gcc/config/arc/arc-tables.opt | 3 ++ gcc/config/arc/arc.c | 22 +- gcc/config/arc/arc.h | 12 +++-- gcc/config/arc/arc.md | 46 gcc/config/arc/fpu.md | 6 +-- gcc/config/arc/fpx.md | 99 ++ gcc/config/arc/t-multilib | 4 +- 12 files changed, 186 insertions(+), 14 deletions(-) diff --git a/gcc/config/arc/arc-arches.def b/gcc/config/arc/arc-arches.def index f24babb..5fd45cd 100644 --- a/gcc/config/arc/arc-arches.def +++ b/gcc/config/arc/arc-arches.def @@ -40,7 +40,7 @@ ARC_ARCH ("arcem", em, FL_MPYOPT_1_6 | FL_DIVREM | FL_CD | FL_NORM \ | FL_BS | FL_SWAP | FL_FPUS | FL_SPFP | FL_DPFP \ - | FL_SIMD | FL_FPUDA, 0) + | FL_SIMD | FL_FPUDA | FL_QUARK, 0) ARC_ARCH ("archs", hs, FL_MPYOPT_7_9 | FL_DIVREM | FL_NORM | FL_CD \ | FL_ATOMIC | FL_LL64 | FL_BS | FL_SWAP \ | FL_FPUS | FL_FPUD, \ diff --git a/gcc/config/arc/arc-c.def b/gcc/config/arc/arc-c.def index 4cfd7b6..fd64376 100644 --- a/gcc/config/arc/arc-c.def +++ b/gcc/config/arc/arc-c.def @@ -58,6 +58,7 @@ ARC_C_DEF ("__ARC_FPU_DP_DIV__", TARGET_FP_DP_SQRT) ARC_C_DEF ("__ARC_FPU_SP_FMA__", TARGET_FP_SP_FUSED) ARC_C_DEF ("__ARC_FPU_DP_FMA__", TARGET_FP_DP_FUSED) ARC_C_DEF ("__ARC_FPU_ASSIST__", TARGET_FP_DP_AX) +ARC_C_DEF ("__ARC_FPX_QUARK__", TARGET_FPX_QUARK) /* To be deprecated. */ ARC_C_DEF ("__A6__", TARGET_ARC600) diff --git a/gcc/config/arc/arc-cpus.def b/gcc/config/arc/arc-cpus.def index 0ceb734..7200485 100644 --- a/gcc/config/arc/arc-cpus.def +++ b/gcc/config/arc/arc-cpus.def @@ -51,6 +51,7 @@ ARC_CPU (em4, em, FL_CD, NONE) ARC_CPU (em4_dmips, em, FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS, NONE) ARC_CPU (em4_fpus, em, FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPU_FPUS, NONE) ARC_CPU (em4_fpuda, em, FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPU_FPUDA, NONE) +ARC_CPU (quarkse_em, em, FL_MPYOPT_3|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPX_QUARK|FL_SPFP|FL_DPFP, NONE) ARC_CPU (hs,hs, 0, NONE) ARC_CPU (archs, hs, FL_MPYOPT_2|FL_DIVREM|FL_LL64, NONE) diff --git a/gcc/config/arc/arc-options.def b/gcc/config/arc/arc-options.def index 0f9d36c..a16637e 100644 --- a/gcc/config/arc/arc-options.def +++ b/gcc/config/arc/arc-options.def @@ -99,10 +99,12 @@ ARC_OPTX (FL_FPU_FPUD, (1ULL << 34), arc_fpu_build, FPU_FPUD, "mfpu=fpud") ARC_OPTX (FL_FPU_FPUD_DIV, (1ULL << 35), arc_fpu_build, FPU_FPUD_DIV, "mfpu=fpud_div") ARC_OPTX (FL_FPU_FPUD_FMA, (1ULL << 36), arc_fpu_build, FPU_FPUD_FMA, "mfpu=fpud_fma") ARC_OPTX (FL_FPU_FPUD_ALL, (1ULL << 37), arc_fpu_build, FPU_FPUD_ALL, "mfpu=fpud_all") +ARC_OPTX (FL_FPX_QUARK,(1ULL << 38), arc_fpu_build, FPX_QK, "quarkse fp") ARC_OPT (FL_FPUS, (0xFULL << 26), 0, "single precission floating point") ARC_OPT (FL_FPUDA, (0xFFULL << 26), 0, "double precission fp assist") ARC_OPT (FL_FPUD, (0xF0FULL << 26), 0, "double precission floating point") +ARC_OPT (FL_QUARK, (1ULL << 38), 0, "Quark SE fp extension") /* Local Variables: */ /* mode: c */ diff --git a/gcc/config/arc/arc-opts.h b/gcc/config/arc/arc-opts.h index e5bca84..2fd3c34 100644 --- a/gcc/config/arc/arc-opts.h +++ b/gcc/config/arc/arc-opts.h @@ -48,6 +48,8 @@ enum processor_type #define FPU_DD0x0080 /* Double precision floating point assist operations. */ #define FPX_DP0x0100 +/* Quark SE floating point instructions. */ +#define FPX_QK0x0200 /* fpus option com
[PATCH] [ARC] Add support for QuarkSE processor.
This patch adds support for a ARC EM version called QuarkSE. This patch needs to be consider together with this previous patch: https://gcc.gnu.org/ml/gcc-patches/2016-06/msg02044.html Thanks, Claudiu gcc/ 2016-05-25 Claudiu Zissulescu * config/arc/arc-arches.def: Add FPX quarkse instruction as valid for arcem. * config/arc/arc-c.def (__ARC_FPX_QUARK__): Define. * config/arc/arc-cpus.def (quarkse_em): Add. * config/arc/arc-options.def (FL_FPX_QUARK, FL_QUARK): Likewise. * config/arc/arc-opts.h (FPX_QK): Define. * config/arc/arc-tables.opt: Regenerate. * config/arc/arc.c (gen_compare_reg): Change. (arc_register_move_cost): Avoid Dy,Dx moves. * config/arc/arc.h (TARGET_HARD_FLOAT): Change. (TARGET_FPX_QUARK, TARGET_FP_ASSIST): Define. * config/arc/arc.md (divsf3, sqrtsf2, fix_truncsfsi2, floatsisf2): New expands. * config/arc/fpu.md (divsf3_fpu, sqrtsf2_fpu, floatsisf2_fpu) (fix_truncsfsi2_fpu): Rename. * config/arc/fpx.md (cmp_quark, cmpsf_quark_, cmpsf_quark_ord) (cmpsf_quark_uneq, cmpsf_quark_eq, divsf3_quark, sqrtsf2_quark) (fix_truncsfsi2_quark, floatsisf2_quark): New patterns. * config/arc/t-multilib: Regenerate. --- gcc/config/arc/arc-arches.def | 2 +- gcc/config/arc/arc-c.def | 1 + gcc/config/arc/arc-cpus.def| 1 + gcc/config/arc/arc-options.def | 2 + gcc/config/arc/arc-opts.h | 2 + gcc/config/arc/arc-tables.opt | 3 ++ gcc/config/arc/arc.c | 22 +- gcc/config/arc/arc.h | 12 +++-- gcc/config/arc/arc.md | 46 gcc/config/arc/fpu.md | 8 ++-- gcc/config/arc/fpx.md | 99 ++ gcc/config/arc/t-multilib | 5 ++- 12 files changed, 188 insertions(+), 15 deletions(-) diff --git a/gcc/config/arc/arc-arches.def b/gcc/config/arc/arc-arches.def index da69a1a..db96ce1 100644 --- a/gcc/config/arc/arc-arches.def +++ b/gcc/config/arc/arc-arches.def @@ -19,7 +19,7 @@ ARC_ARCH("arcem", em, FL_MPYOPT_1_6 | FL_DIVREM | FL_CD | FL_NORM \ | FL_BS | FL_SWAP | FL_FPUS | FL_SPFP | FL_DPFP\ -| FL_SIMD | FL_FPUDA, 0) +| FL_SIMD | FL_FPUDA | FL_QUARK, 0) ARC_ARCH("archs", hs, FL_MPYOPT_7_9 | FL_DIVREM | FL_NORM | FL_CD \ | FL_ATOMIC | FL_LL64 | FL_BS | FL_SWAP\ | FL_FPUS | FL_FPUD, \ diff --git a/gcc/config/arc/arc-c.def b/gcc/config/arc/arc-c.def index 4cfd7b6..fd64376 100644 --- a/gcc/config/arc/arc-c.def +++ b/gcc/config/arc/arc-c.def @@ -58,6 +58,7 @@ ARC_C_DEF ("__ARC_FPU_DP_DIV__", TARGET_FP_DP_SQRT) ARC_C_DEF ("__ARC_FPU_SP_FMA__", TARGET_FP_SP_FUSED) ARC_C_DEF ("__ARC_FPU_DP_FMA__", TARGET_FP_DP_FUSED) ARC_C_DEF ("__ARC_FPU_ASSIST__", TARGET_FP_DP_AX) +ARC_C_DEF ("__ARC_FPX_QUARK__", TARGET_FPX_QUARK) /* To be deprecated. */ ARC_C_DEF ("__A6__", TARGET_ARC600) diff --git a/gcc/config/arc/arc-cpus.def b/gcc/config/arc/arc-cpus.def index 6d93c89..8782bd5 100644 --- a/gcc/config/arc/arc-cpus.def +++ b/gcc/config/arc/arc-cpus.def @@ -23,6 +23,7 @@ ARC_CPU (em4, em, FL_CD, NONE) ARC_CPU (em4_dmips, em, FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS, NONE) ARC_CPU (em4_fpus, em, FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPU_FPUS, NONE) ARC_CPU (em4_fpuda, em, FL_MPYOPT_2|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPU_FPUDA, NONE) +ARC_CPU (quarkse_em, em, FL_MPYOPT_3|FL_CD|FL_DIVREM|FL_NORM|FL_SWAP|FL_BS|FL_FPX_QUARK|FL_SPFP|FL_DPFP, NONE) ARC_CPU (hs, hs, 0, NONE) ARC_CPU (archs, hs, FL_MPYOPT_2|FL_DIVREM|FL_LL64, NONE) diff --git a/gcc/config/arc/arc-options.def b/gcc/config/arc/arc-options.def index 3834894..778f69d 100644 --- a/gcc/config/arc/arc-options.def +++ b/gcc/config/arc/arc-options.def @@ -59,10 +59,12 @@ ARC_OPTX (FL_FPU_FPUD, (1ULL << 34), arc_fpu_build, FPU_FPUD, "mfpu=fpud") ARC_OPTX (FL_FPU_FPUD_DIV, (1ULL << 35), arc_fpu_build, FPU_FPUD_DIV, "mfpu=fpud_div") ARC_OPTX (FL_FPU_FPUD_FMA, (1ULL << 36), arc_fpu_build, FPU_FPUD_FMA, "mfpu=fpud_fma") ARC_OPTX (FL_FPU_FPUD_ALL, (1ULL << 37), arc_fpu_build, FPU_FPUD_ALL, "mfpu=fpud_all") +ARC_OPTX (FL_FPX_QUARK,(1ULL << 38), arc_fpu_build, FPX_QK, "quarkse fp") ARC_OPT (FL_FPUS, (0xFULL << 26), 0, "single precission floating point") ARC_OPT (FL_FPUDA, (0xFFULL << 26), 0, "double precission fp assist") ARC_OPT (FL_FPUD, (0xF0FULL << 26), 0, "double precission floating point") +ARC_OPT (FL_QUARK, (1ULL << 38), 0, "Quark SE fp extension") /* Local Variables: */ /* mode: c */ diff --git a/gcc/config/arc/arc-opts.h b/gcc/config/arc/arc-opts.h index 81446b4..819b97c 100644 --- a/gcc/config/arc/arc-opts.h +++ b/gcc/config/arc/arc-opts.h @@ -48,6 +48,8 @@ enum processor_type #define FPU_DD0x0080 /* Double precision flo