rendered paste bodywesolows@jurassic:~/testing $ cat max.c
int max(int v1, int v2) { return v1 > v2 ? v1 : v2; }
wesolows@jurassic:~/testing $ gcc -mcpu=ultrasparc -mv8plus -O2 -c max.c -o max.o.gcc
wesolows@jurassic:~/testing $ cc -xtarget=ultra -xarch=v8plus -xO2 -c max.c -o max.o.cc
wesolows@jurassic:~/testing $ dis max.o.gcc
disassembly for max.o.gcc
section .text
max()
max: 80 a2 40 08 cmp %o1, %o0
max+0x4: 81 c3 e0 08 retl
max+0x8: 91 66 c0 09 movge %icc, %o1, %o0
wesolows@jurassic:~/testing $ dis max.o.cc
disassembly for max.o.cc
section .text
0x0: 00 00 00 00 illtrap 0x0
0x4: 00 00 00 00 illtrap 0x0
0x8: 00 00 00 00 illtrap 0x0
0xc: 00 00 00 00 illtrap 0x0
max()
max: 80 a2 00 09 cmp %o0, %o1
max+0x4: 34 48 00 02 bg,a,pt %icc, +0x8 <max+0xc>
max+0x8: 92 10 00 08 mov %o0, %o1
max+0xc: 81 c3 e0 08 retl
max+0x10: 90 10 00 09 mov %o1, %o0
wesolows@jurassic:~/testing $ gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.11/3.4.3/specs
Configured with: /gates/sfwnv/builds/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77 --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)
wesolows@jurassic:~/testing $ cc -V
cc: Sun C 5.8 Patch 121015-04 2007/01/10
wesolows@jurassic:~/testing $ cc -fast -xarch=v8plusb -c max.c -o max.o.cc
wesolows@jurassic:~/testing $ dis max.o.cc
disassembly for max.o.cc
section .text
0x0: 00 00 00 00 illtrap 0x0
0x4: 00 00 00 00 illtrap 0x0
0x8: 00 00 00 00 illtrap 0x0
0xc: 00 00 00 00 illtrap 0x0
0x10: 00 00 00 00 illtrap 0x0
0x14: 00 00 00 00 illtrap 0x0
0x18: 00 00 00 00 illtrap 0x0
0x1c: 00 00 00 00 illtrap 0x0
max()
max: 80 a2 40 08 cmp %o1, %o0
max+0x4: 91 66 c0 09 movge %icc, %o1, %o0
max+0x8: 81 c3 e0 08 retl
max+0xc: 01 00 00 00 nop
wesolows@jurassic:~/testing $ cc -fast -xarch=v8plusb -xO5 -c max.c -o max.o.cc
wesolows@jurassic:~/testing $ dis max.o.cc
disassembly for max.o.cc
section .text
0x0: 00 00 00 00 illtrap 0x0
0x4: 00 00 00 00 illtrap 0x0
0x8: 00 00 00 00 illtrap 0x0
0xc: 00 00 00 00 illtrap 0x0
0x10: 00 00 00 00 illtrap 0x0
0x14: 00 00 00 00 illtrap 0x0
0x18: 00 00 00 00 illtrap 0x0
0x1c: 00 00 00 00 illtrap 0x0
max()
max: 80 a2 40 08 cmp %o1, %o0
max+0x4: 91 66 c0 09 movge %icc, %o1, %o0
max+0x8: 81 c3 e0 08 retl
max+0xc: 01 00 00 00 nop