SunOS as & alignment error in Apply.cmm (HEAD)
Volker Stolz
vs at foldr.org
Thu Sep 9 11:39:40 EDT 2004
../../ghc/compiler/ghc-inplace -H32m -O0 -W -fno-warn-unused-matches -fwarn-unused-imports -liberty -optc-DDEBUG -static -#include Prelude.h -#include Rts.h -#include RtsFlags.h -#include RtsUtils.h -#include StgRun.h -#include Schedule.h -#include Printer.h -#include Sanity.h -#include Storage.h -#include SchedAPI.h -#include Timer.h -#include Itimer.h -#include ProfHeap.h -#include LdvProfile.h -#include Profiling.h -#include Apply.h -fvia-C -dcmm-lint -c Apply.cmm -o Apply.o
/usr/ccs/bin/as: "/tmp/ghc5472.s", line 10: error: location counter not on word boundary
make: *** [Apply.o] Error 1
...
.align 4
stg_ap_0_ret_str:
.asciz "stg_ap_0_ret... " <---- l.10
.long stg_ap_0_info
.long stg_ap_0_info
.long stg_ap_0_info
Sneaking in an .align 4 after the .asciz seems to help, as does trimming
the trailing white-space which presumably makes this 15+1 with a NULL-terminated
string instead of 16+1 (complete file attached).
BTW, since the ncg for sparc isn't really complete, it should probably deactived
in boilerplate.mk for now (I have collected some trivial patches, but gave up
when things got non-trivial ;).
--
Volker Stolz * http://www-i2.informatik.rwth-aachen.de/stolz/ * PGP * S/MIME
-------------- next part --------------
.text
.align 4
.file "ghc5200.hc"
.global stg_ap_0_ret_str
.section ".data"
.text
.align 4
stg_ap_0_ret_str:
.asciz "stg_ap_0_ret... "
.long stg_ap_0_info
.long stg_ap_0_info
.long stg_ap_0_info
.long stg_ap_0_info
.long stg_ap_0_info
.long stg_ap_0_info
.long stg_ap_0_info
.long stg_ap_0_info
.long 0
.long 0
.long 2359296
.global stg_ap_0_info
stg_ap_0_info:
.section ".text"
.text
.align 4
.proc 063120
sethi %hi(RtsFlags+140), %o0
ld [%o0+%lo(RtsFlags+140)], %o0
cmp %o0, 0
be,a .LL82
sethi %hi(RtsFlags+116), %o0
.LL3:
sethi %hi(MainCapability+8), %l0
or %l0, %lo(MainCapability+8), %l0
st %f22, [%l0+40]
st %f23, [%l0+44]
st %f24, [%l0+48]
st %f25, [%l0+52]
std %f2, [%l0+56]
std %f4, [%l0+64]
sethi %hi(__iob+32), %o0
or %o0, %lo(__iob+32), %o0
sethi %hi(stg_ap_0_ret_str), %o1
call fprintf, 0
or %o1, %lo(stg_ap_0_ret_str), %o1
ld [%l0+40], %f22
ld [%l0+44], %f23
ld [%l0+48], %f24
ld [%l0+52], %f25
ldd [%l0+56], %f2
ldd [%l0+64], %f4
st %f22, [%l0+40]
st %f23, [%l0+44]
st %f24, [%l0+48]
st %f25, [%l0+52]
std %f2, [%l0+56]
std %f4, [%l0+64]
call printClosure, 0
mov %l1, %o0
ld [%l0+40], %f22
ld [%l0+44], %f23
ld [%l0+48], %f24
ld [%l0+52], %f25
ldd [%l0+56], %f2
ldd [%l0+64], %f4
.LL4:
sethi %hi(RtsFlags+116), %o0
.LL82:
ld [%o0+%lo(RtsFlags+116)], %o0
cmp %o0, 0
be .LL8
add %i0, 4, %i0
.LL6:
sethi %hi(MainCapability+8), %l0
or %l0, %lo(MainCapability+8), %l0
st %f22, [%l0+40]
st %f23, [%l0+44]
st %f24, [%l0+48]
st %f25, [%l0+52]
std %f2, [%l0+56]
std %f4, [%l0+64]
add %i0, 4, %o0
ld [%l0+96], %o2
ld [%o2+40], %o1
sll %o1, 2, %o1
add %o1, %o2, %o1
call checkStackChunk, 0
add %o1, 48, %o1
ld [%l0+40], %f22
ld [%l0+44], %f23
ld [%l0+48], %f24
ld [%l0+52], %f25
ldd [%l0+56], %f2
ldd [%l0+64], %f4
.LL7:
add %i0, 4, %i0
.LL8:
ld [%l1], %o0
ldsh [%o0-4], %o0
cmp %o0, 66
bgu .LL21
sll %o0, 2, %o0
sethi %hi(.LL80), %o1
or %o1, %lo(.LL80), %o1
ld [%o1+%o0], %o0
jmp %o0
nop
.LL21:
ld [%l1], %o0
call %o0, 0
nop
.LL47:
b .LL8
ld [%l1+4], %l1
.LL29:
ld [%i0], %o0
call %o0, 0
nop
.align 4
.align 4
.LL80:
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL29
.word .LL29
.word .LL29
.word .LL29
.word .LL29
.word .LL29
.word .LL29
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL29
.word .LL21
.word .LL29
.word .LL21
.word .LL47
.word .LL47
.word .LL47
.word .LL47
.word .LL47
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.word .LL21
.LLfe1:
.global stg_PAP_info
.section ".data"
.long 0
.long 1835008
stg_PAP_info:
.section ".text"
.text
.align 4
.proc 063120
ldsh [%l1+6], %l0
sll %l0, 2, %o0
sub %i0, %o0, %o0
cmp %o0, %i2
bgeu .LL86
mov %l1, %i1
.LL85:
add %i0, -4, %i0
call stg_gc_unpt_r1, 0
st %l2, [%i0]
.LL86:
sll %l0, 2, %o0
sub %i0, %o0, %i0
ld [%i1+8], %l1
add %i1, 12, %o2
mov 0, %o3
.LL87:
cmp %o3, %l0
bgeu .LL90
sll %o3, 2, %o1
.LL89:
ld [%o2], %o0
st %o0, [%i0+%o1]
add %o2, 4, %o2
b .LL87
add %o3, 1, %o3
.LL90:
ld [%l1], %o0
add %o0, -24, %i1
ldsh [%i1+12], %l0
cmp %l0, 0
bne .LL100
cmp %l0, 1
.LL92:
ld [%o0-24], %o0
call %o0, 0
nop
.LL93:
cmp %l0, 1
.LL100:
bne .LL101
cmp %l0, 2
.LL95:
ld [%i1], %o0
call %o0, 0
nop
.LL96:
cmp %l0, 2
.LL101:
bne,a .LL102
ldsh [%i1+12], %o1
.LL98:
add %i0, -8, %i0
st %l1, [%i0+4]
sethi %hi(stg_apply_interp_info), %o0
or %o0, %lo(stg_apply_interp_info), %o0
call stg_yield_to_interpreter, 0
st %o0, [%i0]
.LL99:
ldsh [%i1+12], %o1
.LL102:
sll %o1, 2, %o1
sethi %hi(stg_ap_stack_entries), %o0
or %o0, %lo(stg_ap_stack_entries), %o0
ld [%o0+%o1], %o0
call %o0, 0
nop
.LLfe2:
.global stg_AP_info
.section ".data"
.long 0
.long 1769472
stg_AP_info:
.section ".text"
.text
.align 4
.proc 063120
ldsh [%l1+6], %o0
st %o0, [%fp-20]
sll %o0, 2, %o2
sub %i0, %o2, %o0
add %o0, -8, %o0
cmp %o0, %i2
blu .LL105
mov %l1, %o1
sethi %hi(stg_upd_frame_info), %o0
or %o0, %lo(stg_upd_frame_info), %o0
st %o0, [%i0-8]
st %l1, [%i0-4]
sub %i0, %o2, %o0
add %o0, -8, %i0
ld [%l1+8], %l1
add %o1, 12, %l0
b .LL106
mov 0, %i1
.LL105:
sethi %hi(MainCapability), %o0
ld [%o0+%lo(MainCapability)], %o0
call %o0, 0
nop
.LL106:
ld [%fp-20], %o0
cmp %i1, %o0
bgeu .LL109
sll %i1, 2, %o1
.LL108:
ld [%l0], %o0
st %o0, [%i0+%o1]
add %l0, 4, %l0
b .LL106
add %i1, 1, %i1
.LL109:
ld [%l1], %o0
add %o0, -24, %i1
ldsh [%i1+12], %l0
cmp %l0, 0
bne .LL119
cmp %l0, 1
.LL111:
ld [%o0-24], %o0
call %o0, 0
nop
.LL112:
cmp %l0, 1
.LL119:
bne .LL120
cmp %l0, 2
.LL114:
ld [%i1], %o0
call %o0, 0
nop
.LL115:
cmp %l0, 2
.LL120:
bne,a .LL121
ldsh [%i1+12], %o1
.LL117:
add %i0, -8, %i0
st %l1, [%i0+4]
sethi %hi(stg_apply_interp_info), %o0
or %o0, %lo(stg_apply_interp_info), %o0
call stg_yield_to_interpreter, 0
st %o0, [%i0]
.LL118:
ldsh [%i1+12], %o1
.LL121:
sll %o1, 2, %o1
sethi %hi(stg_ap_stack_entries), %o0
or %o0, %lo(stg_ap_stack_entries), %o0
ld [%o0+%o1], %o0
call %o0, 0
nop
.LLfe3:
.section ".data"
.long 0
.long 1900544
stg_AP_STACK_info:
.section ".text"
.text
.align 4
.proc 063120
ld [%l1+4], %o0
st %o0, [%fp-20]
sll %o0, 2, %o2
sub %i0, %o2, %o0
add %o0, -8, %o0
cmp %o0, %i2
blu .LL124
mov %l1, %o1
sethi %hi(stg_upd_frame_info), %o0
or %o0, %lo(stg_upd_frame_info), %o0
st %o0, [%i0-8]
st %l1, [%i0-4]
sub %i0, %o2, %o0
add %o0, -8, %i0
ld [%l1+8], %l1
add %o1, 12, %l0
b .LL125
mov 0, %i1
.LL124:
sethi %hi(MainCapability), %o0
ld [%o0+%lo(MainCapability)], %o0
call %o0, 0
nop
.LL125:
ld [%fp-20], %o0
cmp %i1, %o0
bgeu .LL129
sll %i1, 2, %o1
.LL127:
ld [%l0], %o0
st %o0, [%i0+%o1]
add %l0, 4, %l0
b .LL125
add %i1, 1, %i1
.LL128:
.LL129:
ld [%l1], %o0
ldsh [%o0-4], %o0
cmp %o0, 66
bgu .LL142
sll %o0, 2, %o0
sethi %hi(.LL201), %o1
or %o1, %lo(.LL201), %o1
ld [%o1+%o0], %o0
jmp %o0
nop
.LL142:
ld [%l1], %o0
call %o0, 0
nop
.LL168:
b .LL129
ld [%l1+4], %l1
.LL150:
ld [%i0], %o0
call %o0, 0
nop
.align 4
.align 4
.LL201:
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL150
.word .LL150
.word .LL150
.word .LL150
.word .LL150
.word .LL150
.word .LL150
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL150
.word .LL142
.word .LL150
.word .LL142
.word .LL168
.word .LL168
.word .LL168
.word .LL168
.word .LL168
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.word .LL142
.LLfe4:
.ident "GCC: (GNU) 3.2"
More information about the Cvs-ghc
mailing list