Bug 2773 - [PATCH] Linux/sparc64 (64bit userland) fixes for xorg-x11
Summary: [PATCH] Linux/sparc64 (64bit userland) fixes for xorg-x11
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/other (show other bugs)
Version: 6.8.2
Hardware: SPARC Linux (All)
: high normal
Assignee: Adam Jackson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on: 3686
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-19 13:14 UTC by Jeremy Huddleston
Modified: 2008-07-11 14:30 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
VISmoveImageCPP.s (76.21 KB, patch)
2005-03-19 13:14 UTC, Jeremy Huddleston
no flags Details | Splinter Review
asfix.patch (1.18 KB, patch)
2005-03-19 13:54 UTC, Jeremy Huddleston
no flags Details | Splinter Review
xorg-sparc64.patch (3.41 KB, patch)
2005-03-26 12:04 UTC, Jeremy Huddleston
no flags Details | Splinter Review

Description Jeremy Huddleston 2005-03-19 13:14:20 UTC
Trying to build X in 64bit is proving to be a bit difficult... I think this
might be more of a toolchain problem as I've found a workaround... I just wanted
to report here in case others come across the issue or you already know of a
better fix...

sparc64-unknown-linux-gnu-gcc -c -x assembler-with-cpp -Wa,-Av9a VISmoveImage.s
-o VISmoveImage.o
VISmoveImage.s: Assembler messages:
VISmoveImage.s:207: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:233: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:240: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:244: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:244: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:246: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:246: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:250: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:250: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:252: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:252: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:257: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:257: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:257: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:262: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:263: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:270: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:726: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:918: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:918: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:918: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:918: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:918: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:918: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:922: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:923: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:928: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:980: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:980: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:983: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:983: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:986: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:986: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:990: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:990: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:994: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:994: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:999: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:999: Error: detected global register use not covered by .register
pseudo-op
VISmoveImage.s:1004: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1004: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1010: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1010: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1016: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1016: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1023: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1023: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1030: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1030: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1038: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1038: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1046: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1046: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1055: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1055: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1064: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1064: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1074: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1074: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1093: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1094: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1095: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1096: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1097: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1098: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1099: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1100: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1101: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1102: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1103: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1104: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1105: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1106: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1107: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1108: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1175: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1201: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1210: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1214: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1214: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1220: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1220: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1222: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1222: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1224: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1224: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1224: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1226: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1228: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:1238: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2117: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2324: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2324: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2324: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2324: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2324: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2324: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2338: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2339: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2344: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2398: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2407: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2418: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2427: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2438: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2446: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2457: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2465: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2476: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2483: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2494: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2501: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2512: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2518: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2529: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2535: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2546: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2553: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2564: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2571: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2582: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2590: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2601: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2609: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2620: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2629: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2640: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2649: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2660: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2663: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2673: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2676: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2695: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2696: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2697: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2698: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2699: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2700: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2701: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2702: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2703: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2704: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2705: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2706: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2707: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2708: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2709: Error: detected global register use not covered by
.register pseudo-op
VISmoveImage.s:2710: Error: detected global register use not covered by
.register pseudo-op
make[7]: *** [VISmoveImage.o] Error 1
make[7]: Leaving directory
`/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc/programs/Xserver/hw/xfree86/drivers/sunffb'
make[6]: *** [all] Error 2
make[6]: Leaving directory
`/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc/programs/Xserver/hw/xfree86/drivers'
make[5]: *** [all] Error 2
make[5]: Leaving directory
`/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc/programs/Xserver/hw/xfree86'
make[4]: *** [hw/xfree86] Error 2
make[4]: Leaving directory
`/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc/programs/Xserver'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc/programs'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc'
make: *** [World] Error 2


I'll attach the CPP output achieved via
sparc64-unknown-linux-gnu-gcc -E -c -x assembler-with-cpp -Wa,-Av9a
VISmoveImage.s -o VISmoveImageCPP.s

But I get no errors when I try assembling that with:
sparc64-unknown-linux-gnu-as -Av9a VISmoveImageCPP.s -o VISmoveImage.o

This also happens with assembly in Mesa and other ffb assembly code
Comment 1 Jeremy Huddleston 2005-03-19 13:14:56 UTC
Created attachment 2153 [details] [review]
VISmoveImageCPP.s

preprocessed assembly
Comment 2 Jeremy Huddleston 2005-03-19 13:26:08 UTC
Oh, and for completeness, doing gcc -c -x assembler -Wa,-Av9a VISmoveImageCPP.s
does give the errors as well...
Comment 3 Jeremy Huddleston 2005-03-19 13:54:38 UTC
Created attachment 2155 [details] [review]
asfix.patch

I'm using this patch in conjunction with the following in host.def as a shot at
a workaround:
#define AsCmd sparc64-unknown-linux-gnu-as

I haven't tested it yet (It's compiling right now).
Comment 4 Roland Mainz 2005-03-19 14:18:50 UTC
CC:'ing Alan Coopersmith who may be familar with this kind of hardware to take a
look at the patch...
Comment 5 Alan Coopersmith 2005-03-19 22:52:41 UTC
Sorry, I don't know SPARC assembly language.
Comment 6 Jeremy Huddleston 2005-03-20 00:52:20 UTC
Ok, well I'll just use this bug as a tracker for linux/sparc64 issues/patches
for the time being.

Another issue I found was the following:

/usr/tmp/portage/xorg-x11-6.8.2-r1/work/xc/programs/Xserver/hw/xfree86/xf86cfg $
make
rm -f xorgcfg
sparc64-unknown-linux-gnu-gcc -o xorgcfg -mcpu=ultrasparc -mtune=ultrasparc -O2
-pipe -fno-strict-aliasing -ansi -pedantic -Wno-return-type -w    
-L../../../../../exports/lib   accessx.o     cards.o config.o        card-cfg.o
     expert.ohelp.o  interface.o     keyboard-cfg.o  libc_wrapper.o loader.o
loadmod.o      monitor-cfg.o    mouse-cfg.o     options.o       screen-cfg.o   
screen.o       startx.o strlcat.o strlcpy.o     stubs.o text-mode.o    
vidmode.o       xf86config.o -lxkbui -lxkbfile -lxf86config -lXxf86misc        
          -lXxf86vm -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lXt -lSM -lICE   
          -lXpm -lXp -L../loader -lxloader -L../dummylib -ldummy -rdynamic -ldl
                  -lXext -lX11 -lncurses  -lm     
-Wl,-rpath-link,../../../../../exports/lib
../loader/libxloader.a(loader.o)(.data+0x240): undefined reference to `.rem'
../loader/libxloader.a(loader.o)(.data+0x250): undefined reference to `.urem'
../loader/libxloader.a(loader.o)(.data+0x260): undefined reference to `.mul'
../loader/libxloader.a(loader.o)(.data+0x270): undefined reference to `.umul'
../loader/libxloader.a(loader.o)(.data+0x280): undefined reference to `.div'
../loader/libxloader.a(loader.o)(.data+0x290): undefined reference to `.udiv'
collect2: ld returned 1 exit status
make: *** [xorgcfg] Error 1
Comment 7 Alan Coopersmith 2005-03-20 08:31:50 UTC
Those functions should be defined by the DEFFUNCDOT  macro section in
xc/programs/Xserver/hw/xfree86/loader/loader.c
Comment 8 Jeremy Huddleston 2005-03-20 11:17:33 UTC
They're defined, and that's the problem.  They're in the 32bit glibc, but not
the 64bit glibc.  I'm adding !defined(__arch64__)s around the code that uses
them in loader.c since they're not needed on sparc64.  I'll post a final patch
including that and other 64bit hicups I run into after testing it out.
Comment 9 Jeremy Huddleston 2005-03-26 12:04:54 UTC
Created attachment 2218 [details] [review]
xorg-sparc64.patch

This patch fixes the sparc64 assembly files so that they include the proper
.register pseudoops on sparc64 as well as a few other linux sparc64 related
fixes.
Comment 10 Jeremy Huddleston 2005-04-14 02:09:10 UTC
So this patch is fairly trivial... it would be nice to get it applied or
commented on.
Comment 11 Adam Jackson 2005-04-19 08:32:27 UTC
i need to split this patch, the Mesa changes need to be fed to Mesa first.
Comment 12 Erik Andren 2006-04-18 05:06:32 UTC
Ping and adding patch keyword. 
Comment 13 Daniel Stone 2007-02-27 01:25:49 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 14 Adam Jackson 2008-07-11 14:30:49 UTC
afaict these are all applied now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.