.align 4
+/* FIXME: users of this should be in psx_gpu instead */
+#ifndef __PIC__
+#define load_pointer(register, pointer) \
+ movw register, :lower16:pointer; \
+ movt register, :upper16:pointer; \
+
+#else
+#define load_pointer(register, pointer) \
+ ldr register, =pointer \
+
+#endif
+
#define function(name) \
.global name; \
name: \
vld1.32 { uvrg }, [ temp ]; \
add temp, psx_gpu, #psx_gpu_uvrg_dy_offset; \
vld1.32 { uvrg_dy }, [ temp ]; \
- movw reciprocal_table_ptr, :lower16:reciprocal_table; \
- movt reciprocal_table_ptr, :upper16:reciprocal_table; \
+ load_pointer(reciprocal_table_ptr, reciprocal_table); \
\
vmov.u32 c_0x01, #0x01 \
function(setup_spans_up_right)
setup_spans_up_up(right, left)
+.pool
#define setup_spans_down_down(minor, major) \
setup_spans_prologue(); \
setup_spans_prologue_b()
bal 4b
+.pool
#undef span_uvrg_offset
#undef span_edge_data