Index: config/i386/i386.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v retrieving revision 1.383 diff -c -d -p -r1.383 i386.h *** config/i386/i386.h 2 Apr 2004 15:05:51 -0000 1.383 --- config/i386/i386.h 2 Apr 2004 16:08:00 -0000 *************** extern int target_flags; *** 219,224 **** --- 219,225 ---- #define TARGET_PENTIUM4 (ix86_tune == PROCESSOR_PENTIUM4) #define TARGET_K8 (ix86_tune == PROCESSOR_K8) #define TARGET_ATHLON_K8 (TARGET_K8 || TARGET_ATHLON) + #define TARGET_PENTIUM_M (ix86_tune == PROCESSOR_PENTIUM_M) #define TARGET_NOCONA (ix86_tune == PROCESSOR_NOCONA) #define TUNEMASK (1 << ix86_tune) *************** extern int x86_prefetch_sse; *** 607,612 **** --- 608,615 ---- builtin_define ("__tune_k8__"); \ else if (TARGET_PENTIUM4) \ builtin_define ("__tune_pentium4__"); \ + else if (TARGET_PENTIUM_M) \ + builtin_define ("__tune_pentium_m__"); \ else if (TARGET_NOCONA) \ builtin_define ("__tune_nocona__"); \ \ *************** extern int x86_prefetch_sse; *** 677,682 **** --- 680,690 ---- builtin_define ("__pentium4"); \ builtin_define ("__pentium4__"); \ } \ + else if (ix86_arch == PROCESSOR_PENTIUM_M) \ + { \ + builtin_define ("__pentium_m"); \ + builtin_define ("__pentium_m__"); \ + } \ else if (ix86_arch == PROCESSOR_NOCONA) \ { \ builtin_define ("__nocona"); \ *************** enum processor_type *** 2952,2957 **** --- 2960,2966 ---- PROCESSOR_ATHLON, PROCESSOR_PENTIUM4, PROCESSOR_K8, + PROCESSOR_PENTIUM_M, PROCESSOR_NOCONA, PROCESSOR_max }; Index: config/i386/i386.md =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v retrieving revision 1.523 diff -c -d -p -r1.523 i386.md *** config/i386/i386.md 2 Apr 2004 15:05:55 -0000 1.523 --- config/i386/i386.md 2 Apr 2004 16:08:03 -0000 *************** *** 149,155 **** ;; Processor type. This attribute must exactly match the processor_type ;; enumeration in i386.h. ! (define_attr "cpu" "i386,i486,pentium,pentiumpro,k6,athlon,pentium4,k8,nocona" (const (symbol_ref "ix86_tune"))) ;; A basic instruction type. Refinements due to arguments to be --- 149,155 ---- ;; Processor type. This attribute must exactly match the processor_type ;; enumeration in i386.h. ! (define_attr "cpu" "i386,i486,pentium,pentiumpro,k6,athlon,pentium4,k8,pentium_m,nocona" (const (symbol_ref "ix86_tune"))) ;; A basic instruction type. Refinements due to arguments to be Index: config/i386/i386.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v retrieving revision 1.661 diff -c -d -p -r1.661 i386.c *** config/i386/i386.c 2 Apr 2004 15:05:53 -0000 1.661 --- config/i386/i386.c 2 Apr 2004 16:08:06 -0000 *************** struct processor_costs pentium4_cost = { *** 458,463 **** --- 458,507 ---- }; static const + struct processor_costs pentium_m_cost = { + 1, /* cost of an add instruction */ + 1, /* cost of a lea instruction */ + 2, /* variable shift costs */ + 2, /* constant shift costs */ + {4, 4, 4, 4, 4}, /* cost of starting a multiply */ + 0, /* cost of multiply per each bit set */ + {56, 56, 56, 56, 56}, /* cost of a divide/mod */ + 1, /* cost of movsx */ + 1, /* cost of movzx */ + 16, /* "large" insn */ + 6, /* MOVE_RATIO */ + 2, /* cost for loading QImode using movzbl */ + {3, 3, 3}, /* cost of loading integer registers + in QImode, HImode and SImode. + Relative to reg-reg move (2). */ + {3, 3, 3}, /* cost of storing integer registers */ + 2, /* cost of reg,reg fld/fst */ + {3, 3, 3}, /* cost of loading fp registers + in SFmode, DFmode and XFmode */ + {3, 3, 3}, /* cost of loading integer registers */ + 2, /* cost of moving MMX register */ + {3, 3}, /* cost of loading MMX registers + in SImode and DImode */ + {3, 3}, /* cost of storing MMX registers + in SImode and DImode */ + 1, /* cost of moving SSE register */ + {3, 3, 3}, /* cost of loading SSE registers + in SImode, DImode and TImode */ + {3, 3, 3}, /* cost of storing SSE registers + in SImode, DImode and TImode */ + 2, /* MMX or SSE register to integer */ + 64, /* size of prefetch block */ + 6, /* number of parallel prefetches */ + 2, /* Branch cost */ + 5, /* cost of FADD and FSUB insns. */ + 7, /* cost of FMUL instruction. */ + 43, /* cost of FDIV instruction. */ + 2, /* cost of FABS instruction. */ + 2, /* cost of FCHS instruction. */ + 43, /* cost of FSQRT instruction. */ + }; + + static const struct processor_costs nocona_cost = { 1, /* cost of an add instruction */ 1, /* cost of a lea instruction */ *************** const struct processor_costs *ix86_cost *** 513,532 **** #define m_PENT4 (1<