.align 4
-#ifndef __MACH__
+#include "arm_features.h"
-#define function(name) \
- .global name; \
- .type name, %function; \
- name: \
+#define function(name) FUNCTION(name):
+
+#ifndef TEXRELS_FORBIDDEN
#define JT_OP_REL(table_label, index_reg, temp)
#define JT_OP(x...) x
#define JTE(start, target) target
-#define EXTRA_UNSAVED_REGS
-
#else
-#define function(name) \
- .globl _##name; \
- name: \
- _##name: \
-
#define JT_OP_REL(table_label, index_reg, temp) \
adr temp, table_label; \
ldr temp, [temp, index_reg, lsl #2]; \
#define JT_OP(x...)
#define JTE(start, target) (target - start)
-// r7 is preserved, but add it for EABI alignment..
-#define EXTRA_UNSAVED_REGS r7, r9,
+#endif
+#ifdef __MACH__
#define flush_render_block_buffer _flush_render_block_buffer
#define setup_sprite_untextured_simple _setup_sprite_untextured_simple
#define update_texture_8bpp_cache _update_texture_8bpp_cache
-
#endif
@ r0: psx_gpu
#define blend_blocks_subtract_combine_textured() \
vbif.u16 blend_pixels, pixels, blend_mask \
-#define blend_blocks_subtract_set_stb_textured() \
+#define blend_blocks_subtract_set_stp_textured() \
vorr.u16 blend_pixels, #0x8000 \
#define blend_blocks_subtract_msb_mask_textured() \
#define blend_blocks_subtract_combine_untextured() \
-#define blend_blocks_subtract_set_stb_untextured() \
+#define blend_blocks_subtract_set_stp_untextured() \
vorr.u16 blend_pixels, blend_pixels, msb_mask \
#define blend_blocks_subtract_msb_mask_untextured() \
vld1.u32 { pixels_next }, [pixel_ptr, :128], c_64; \
vorr.u16 blend_pixels, fb_pixels_rb, fb_pixels_g; \
vand.u16 pixels_rb, pixels_next, d128_0x7C1F; \
- blend_blocks_subtract_set_stb_##texturing(); \
+ blend_blocks_subtract_set_stp_##texturing(); \
vand.u16 pixels_g, pixels_next, d128_0x03E0; \
blend_blocks_subtract_combine_##texturing(); \
blend_blocks_subtract_set_blend_mask_##texturing(); \
\
blend_blocks_subtract_msb_mask_##texturing(); \
vorr.u16 blend_pixels, fb_pixels_rb, fb_pixels_g; \
- blend_blocks_subtract_set_stb_##texturing(); \
+ blend_blocks_subtract_set_stp_##texturing(); \
blend_blocks_subtract_combine_##texturing(); \
vbit.u16 blend_pixels, fb_pixels, draw_mask; \
vst1.u16 { blend_pixels }, [fb_ptr_next]; \
ldr fb_ptr_next, [pixel_ptr, #28]; \
\
vorr.u16 blend_pixels, fb_pixels_rb, fb_pixels_g; \
+ vorr.u16 blend_pixels, #0x8000; /* stp */ \
vbif.u16 blend_pixels, pixels, blend_mask; \
\
vld1.u32 { pixels }, [pixel_ptr, :128], c_64; \
\
1: \
vorr.u16 blend_pixels, fb_pixels_rb, fb_pixels_g; \
- vorr.u16 blend_pixels, blend_pixels, msb_mask; \
+ vorr.u16 blend_pixels, #0x8000; /* stp */ \
vbif.u16 blend_pixels, pixels, blend_mask; \
+ vorr.u16 blend_pixels, blend_pixels, msb_mask; \
vbit.u16 blend_pixels, fb_pixels, draw_mask; \
vst1.u16 { blend_pixels }, [fb_ptr_next]; \
\