gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
1617 Posts in 535 Topics by 779 Members - Latest Member: rhoronjeff@comcast.net December 03, 2022, 12:46:11 AM
*
gfx* Home | Help | Search | Login | Register | gfx
gfx
Absoft User Forum  |  Support  |  Linux  |  assembler errors on 64 bit
gfx
gfxgfx
 

Author Topic: assembler errors on 64 bit  (Read 9113 times)

jdougher00

  • Newbie
  • *
  • Posts: 2
assembler errors on 64 bit
« on: August 17, 2010, 12:17:00 PM »
I'm getting an assembler error when compiling using -m64 on a 64-bit machine.  Smells like an installation error or something on the system that the compiler is mis-reading, but I'm unable to trace it.  Version and compiler messages follow. Thanks.

Update: looks like as is being called with a --32 flag; not sure why. See below.

~/temp/t24> f77 -v
Absoft 64-bit Fortran 95 10.0.7


~/temp/t24> cat /etc/redhat-release
CentOS release 5.5 (Final)

~/temp/t24> uname -a
Linux callisto 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

~/temp/t24> gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)


~/temp/t24> more hello.for
      program hello

      write(6,*) 'hello world'

      end

~/temp/t24> gcc -m32 -c hello.for -o hello.o
~/temp/t24> gcc -m64 -c hello.for -o hello.o
~/temp/t24> f77 -m32 -c hello.for -o hello.o
~/temp/t24> f77 -m64 -c hello.for -o hello.o
/tmp/APNqi2/hello.s: Assembler messages:
/tmp/APNqi2/hello.s:41: Error: bad register name `%rsp'
/tmp/APNqi2/hello.s:42: Error: bad register name `%rsp)'
/tmp/APNqi2/hello.s:43: Error: bad register name `%rsp)'
/tmp/APNqi2/hello.s:44: Error: bad register name `%rsp)'
/tmp/APNqi2/hello.s:45: Error: bad register name `%rsp)'
/tmp/APNqi2/hello.s:46: Error: bad register name `%rsp'
/tmp/APNqi2/hello.s:47: Error: bad register name `%rbp'
/tmp/APNqi2/hello.s:48: Error: bad register name `%rsp'
/tmp/APNqi2/hello.s:49: Error: bad register name `%rsp'
/tmp/APNqi2/hello.s:52: Error: bad register name `%rbp)'
/tmp/APNqi2/hello.s:53: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:54: Error: bad register name `%rbp)'
/tmp/APNqi2/hello.s:55: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:56: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:57: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:58: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:59: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:60: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:61: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:62: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:63: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:64: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:65: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:66: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:67: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:68: Error: bad register name `%rbp)'
/tmp/APNqi2/hello.s:69: Error: bad register name `%rax'
/tmp/APNqi2/hello.s:70: Error: bad register name `%r11'
/tmp/APNqi2/hello.s:71: Error: bad register name `%r11'
/tmp/APNqi2/hello.s:72: Error: bad register name `%r10'
/tmp/APNqi2/hello.s:73: Error: bad register name `%r10'
/tmp/APNqi2/hello.s:74: Error: bad register name `%r9'
/tmp/APNqi2/hello.s:75: Error: bad register name `%r9'
/tmp/APNqi2/hello.s:76: Error: bad register name `%r8'
/tmp/APNqi2/hello.s:77: Error: bad register name `%r8'
/tmp/APNqi2/hello.s:78: Error: bad register name `%rcx'
/tmp/APNqi2/hello.s:79: Error: bad register name `%rcx'
/tmp/APNqi2/hello.s:80: Error: bad register name `%rbp)'
/tmp/APNqi2/hello.s:81: Error: bad register name `%rbp)'
/tmp/APNqi2/hello.s:82: Error: bad register name `%rbp)'
assembler failed.

~/temp/t24> f77 -c hello.for -o hello.o
/tmp/X5Uu8Y/hello.s: Assembler messages:
/tmp/X5Uu8Y/hello.s:41: Error: bad register name `%rsp'
/tmp/X5Uu8Y/hello.s:42: Error: bad register name `%rsp)'
/tmp/X5Uu8Y/hello.s:43: Error: bad register name `%rsp)'
/tmp/X5Uu8Y/hello.s:44: Error: bad register name `%rsp)'
/tmp/X5Uu8Y/hello.s:45: Error: bad register name `%rsp)'
/tmp/X5Uu8Y/hello.s:46: Error: bad register name `%rsp'
/tmp/X5Uu8Y/hello.s:47: Error: bad register name `%rbp'
/tmp/X5Uu8Y/hello.s:48: Error: bad register name `%rsp'
/tmp/X5Uu8Y/hello.s:49: Error: bad register name `%rsp'
/tmp/X5Uu8Y/hello.s:52: Error: bad register name `%rbp)'
/tmp/X5Uu8Y/hello.s:53: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:54: Error: bad register name `%rbp)'
/tmp/X5Uu8Y/hello.s:55: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:56: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:57: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:58: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:59: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:60: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:61: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:62: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:63: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:64: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:65: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:66: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:67: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:68: Error: bad register name `%rbp)'
/tmp/X5Uu8Y/hello.s:69: Error: bad register name `%rax'
/tmp/X5Uu8Y/hello.s:70: Error: bad register name `%r11'
/tmp/X5Uu8Y/hello.s:71: Error: bad register name `%r11'
/tmp/X5Uu8Y/hello.s:72: Error: bad register name `%r10'
/tmp/X5Uu8Y/hello.s:73: Error: bad register name `%r10'
/tmp/X5Uu8Y/hello.s:74: Error: bad register name `%r9'
/tmp/X5Uu8Y/hello.s:75: Error: bad register name `%r9'
/tmp/X5Uu8Y/hello.s:76: Error: bad register name `%r8'
/tmp/X5Uu8Y/hello.s:77: Error: bad register name `%r8'
/tmp/X5Uu8Y/hello.s:78: Error: bad register name `%rcx'
/tmp/X5Uu8Y/hello.s:79: Error: bad register name `%rcx'
/tmp/X5Uu8Y/hello.s:80: Error: bad register name `%rbp)'
/tmp/X5Uu8Y/hello.s:81: Error: bad register name `%rbp)'
/tmp/X5Uu8Y/hello.s:82: Error: bad register name `%rbp)'
assembler failed.


More info:

~/temp/t24> f77 -v hello.for -o hello
mkdir /tmp/6JKRy4
/opt/absoft/bin/af90fe64 -Ap -f77_compat -YVAR_NAMES=ASIS -YEXT_NAMES=ASIS -YCOM_NAMES=ASIS -p/opt/absoft/f90includes64 -F /tmp/6JKRy4/hello.l hello.for
/opt/absoft/bin/atmod -TARG:abi=n64 -o /tmp/6JKRy4/hello.B /tmp/6JKRy4/hello.l
/opt/absoft/bin/be -O0 -LANG:=f90 -PHASE:c -TARG:abi=n64 -fs,/tmp/6JKRy4/hello.s -fB,/tmp/6JKRy4/hello.B hello.for
as --32 -o /tmp/6JKRy4/hello.o /tmp/6JKRy4/hello.s
/tmp/6JKRy4/hello.s: Assembler messages:
/tmp/6JKRy4/hello.s:41: Error: bad register name `%rsp'
/tmp/6JKRy4/hello.s:42: Error: bad register name `%rsp)'
/tmp/6JKRy4/hello.s:43: Error: bad register name `%rsp)'
/tmp/6JKRy4/hello.s:44: Error: bad register name `%rsp)'
/tmp/6JKRy4/hello.s:45: Error: bad register name `%rsp)'
/tmp/6JKRy4/hello.s:46: Error: bad register name `%rsp'
/tmp/6JKRy4/hello.s:47: Error: bad register name `%rbp'
/tmp/6JKRy4/hello.s:48: Error: bad register name `%rsp'
/tmp/6JKRy4/hello.s:49: Error: bad register name `%rsp'
/tmp/6JKRy4/hello.s:52: Error: bad register name `%rbp)'
/tmp/6JKRy4/hello.s:53: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:54: Error: bad register name `%rbp)'
/tmp/6JKRy4/hello.s:55: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:56: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:57: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:58: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:59: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:60: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:61: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:62: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:63: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:64: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:65: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:66: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:67: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:68: Error: bad register name `%rbp)'
/tmp/6JKRy4/hello.s:69: Error: bad register name `%rax'
/tmp/6JKRy4/hello.s:70: Error: bad register name `%r11'
/tmp/6JKRy4/hello.s:71: Error: bad register name `%r11'
/tmp/6JKRy4/hello.s:72: Error: bad register name `%r10'
/tmp/6JKRy4/hello.s:73: Error: bad register name `%r10'
/tmp/6JKRy4/hello.s:74: Error: bad register name `%r9'
/tmp/6JKRy4/hello.s:75: Error: bad register name `%r9'
/tmp/6JKRy4/hello.s:76: Error: bad register name `%r8'
/tmp/6JKRy4/hello.s:77: Error: bad register name `%r8'
/tmp/6JKRy4/hello.s:78: Error: bad register name `%rcx'
/tmp/6JKRy4/hello.s:79: Error: bad register name `%rcx'
/tmp/6JKRy4/hello.s:80: Error: bad register name `%rbp)'
/tmp/6JKRy4/hello.s:81: Error: bad register name `%rbp)'
/tmp/6JKRy4/hello.s:82: Error: bad register name `%rbp)'
assembler failed.
rm /tmp/6JKRy4/*
rmdir /tmp/6JKRy4/
~/temp/t24>
« Last Edit: August 17, 2010, 02:06:26 PM by jdougher00 »

forumadmin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 333
Re: assembler errors on 64 bit
« Reply #1 on: August 18, 2010, 08:12:28 AM »
V10.0.7 is pretty old. About 5 years. Has it ever worked?

There are only two ways to get the driver to send that option to as. One is with the -m32 option and you're clearly not using it. The second is if the $ABSOFT_AS environment variable is set. Perhaps left over from an old installation of our V9.0? Try

echo $ABSOFT_AS

What do you get?

jdougher00

  • Newbie
  • *
  • Posts: 2
Re: assembler errors on 64 bit
« Reply #2 on: August 18, 2010, 03:01:23 PM »
Sure enough, ABSOFT_AS was set to "as --32" in a system login script. Removed that line (and another line that set ABSOFT_LINKER) and that fixed the issue. The system in question is new, and the set-up was largely copied from another, older, 32-bit system. Those lines were missed when the 64 bit compiler was installed.

Yea, v10.0.7 is old. It was sitting on a shelf, unopened; the ebb and flow of projects had orphaned it, and a new urgent need arose, so it was pressed into service.

Thanks for your help.

jjd



Absoft User Forum  |  Support  |  Linux  |  assembler errors on 64 bit
 

gfxgfx
gfx gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!