Login | Register
Login | Register

My pages Projects SunSource.net openCollabNet
OpenSPARC.net >  Cool Tools >  GCC for SPARC® Systems >  FAQ

Cool Tools - GCC for SPARC® Systems - Handling -mcpu, -mtune, -xarch, and -xtarget options

Description

-mcpu and -xtarget expand into -xarch, -xchip, and -xcache.  -mtune expands into -xchip.  The processing of -xarch, -xchip, and -xcache is to take the right-most version of those options.  The -m32 and -m64 options will have an effect upon the value of -xarch.

The default value for -m32 and -m64 is -mcpu=v9.

-mvis forces -xarch to be at least v8plusa for -m32 and v9a for -m64.  -mno-vis forces -xarch to be no more than v8plus for -m32 and v9 for -m64.  -xvis=yes is the same as -mvis and -xvis=no is the same as -mno-vis.

-mv8plus forces -xarch to be at least v8plus for -m32 and has no effect for -m64. -mno-v8plus forces -xarch to be at most v8 for -m32 and has not effect for -m64.  -mv8plus and -mno-v8plus apply to the previous -mcpu/-xtarget/-xarch option and has no effect on subsequent -mcpu/-xtarget/-xarch options.

Items in green in the following tables are extensions to exisiting GCC command line options.

Table showing expansion of -mcpu and -xtarget command line options
flag
-xarch=
-xchip=
-xcache=
-m32/-m64
-mcpu=v7
-mcpu=cypress
-m32: v7
-m64: v9
 else: v7
generic generic

-mcpu=v8
-mcpu=supersparc
-mcpu=sparclite
-mcpu=f930
-mcpu=f934
-mcpu=hypersparc
-mcpu=sparclite86x
-mcpu=sparclet
-mcpu=tsc701
-mv8
-msupersparc
-msparclite
-mf930
-mf934

-m32: v8
-m64: v9
 else: v8

generic
generic

-mcpu=ultrasparc
-xtarget=ultra
-m32: v8plusa
-m64: v9a
  else: v8plusa
ultra
16/32/1:512/64/1

-mcpu=ultrasparc2
-xtarget=ultra2
-m32: v8plusa
-m64: v9a
  else: v8plusa
ultra2
16/32/1:512/64/1

-mcpu=ultrasparc2i
-xtarget=ultra2i
-m32: v8plusa
-m64: v9a
  else: v8plusa
ultra2i 16/32/1:512/64/1
-mcpu=ultrasparc2e
-xtarget=ultra2e
-m32: v8plusa
-m64: v9a
  else: v8plusa
ultra2e 16/32/1:256/64/4
-mcpu=gemini -m32: v8plusa
-m64: v9a
  else: v8plusa
ultra2 16/32/1:512/64/4
-mcpu=ultrasparc3
-xtarget=ultra3
-m32: v8plusb
-m64: v9b
  else: v8plusb
ultra3 64/32/4:8192/512/2

-mcpu=ultrasparc3cu
-xtarget=ultra3cu
-m32: v8plusb
-m64: v9b
  else: v8plusb
ultra3cu
64/32/4:8192/512/2

-mcpu=ultrasparc3i
-xtarget=ultra3i
-m32: v8plusb
-m64: v9b
  else: v8plusb
ultra3i
64/32/4:1024/64/4

-mcpu=ultrasparc3iplus
-xtarget=ultra3iplus
-m32: v8plusb
-m64: v9b
  else: v8plusb
ultra3iplus
64/32/4:4096/64/4

-mcpu=ultrasparc4
-xtarget=ultra4
-m32: v8plusb
-m64: v8plusb
  else: v8plusb
ultra4 64/32/4:8192/128/2
-mcpu=ultrasparc4plus
-xtarget=ultra4plus
-m32: v8plusb
-m64: v8plusb
  else: v8plusb
ultra4plus 64/32/4:2048/64/4:32768/64/4
-mcpu=niagara
-mcpu=ultraT1
-xtarget=ultraT1
-m32: v8plus
-m64: v9
  else: v8plus
ultraT1 8/16/4/4:3072/64/12/32
-mcpu=v9
-m32: v8plus
-m64: v9
  else: v8plus
generic generic
-xtarget=generic
-m32: generic
-m64: generic64
  else: generic
generic
generic
-m32: -m32
-m64: -m64
  else: -m32
-xtarget=generic64
-m32: generic
-m64: generic64
   else: generic64
ultra3
generic
-m32: -m32
-m64: -m64
   else: -m64


Table showing expansion of -mtune
-mtune=
-xchip=
m7
cypress
v8
supersparc
sparclite
f930
f934
hypersparc
sparclite86x
sparclet
tsc701
generic
ultrasparc
ultra
ultrasparc2
ultra2
ultrasparc2e
ultra2e
ultrasparc2i
ultra2i
ultrasparc3
ultra3
ultrasparc3i
ultra3i
ultrasparc3cu
ultra3cu
ultrasparc3iplus
ultra3iplus
ultrasparc4
ultra4
ultrasparc4plus ultra4plus
niagara
ultraT1
ultraT1

Documents