63static void drawEWP1(
void) {
65 rasterClearTestRegion(0, 0, 8, 8);
67 rasterFlushPrimitive();
76static void drawEWP2(
void) {
78 rasterClearTestRegion(0, 0, 8, 16);
80 rasterFlushPrimitive();
89static void drawEWP3(
void) {
91 rasterClearTestRegion(0, 0, 8, 16);
93 rasterFlushPrimitive();
113static void drawEWP4(
void) {
115 rasterClearTestRegion(0, 0, 12, 12);
117 rasterFlushPrimitive();
131static void drawEWP5(
void) {
133 rasterClearTestRegion(0, 0, 8, 8);
135 rasterFlushPrimitive();
141static void drawEWP6(
void) {
143 rasterClearTestRegion(0, 0, 4, 20);
145 rasterFlushPrimitive();
153static void drawEWP7(
void) {
155 rasterClearTestRegion(0, 0, 8, 20);
157 rasterFlushPrimitive();
178CESTER_TEST(ewp1_y0_x2_right_vertex, gpu_raster_phase6,
203CESTER_TEST(ewp1_y2_x0_integer_right, gpu_raster_phase6,
211CESTER_TEST(ewp1_y2_x1_integer_right, gpu_raster_phase6,
224CESTER_TEST(ewp1_y4_bottom_excluded, gpu_raster_phase6,
244CESTER_TEST(ewp3_shifted_y0_x4_right_vertex, gpu_raster_phase6,
249CESTER_TEST(ewp3_shifted_y3_x2_integer_right_boundary, gpu_raster_phase6,
256CESTER_TEST(ewp3_shifted_y3_x3_excluded, gpu_raster_phase6,
271CESTER_TEST(ewp4_y0_x7_right_vertex, gpu_raster_phase6,
276CESTER_TEST(ewp4_y4_x2_irrational, gpu_raster_phase6,
295CESTER_TEST(ewp4_y8_narrow_post_apex, gpu_raster_phase6,
316CESTER_TEST(ewp5_y0_x2_right_vertex, gpu_raster_phase6,
352CESTER_TEST(ewp6_y15_bottom_excluded, gpu_raster_phase6,
357CESTER_TEST(ewp6_x1_right_edge_clean, gpu_raster_phase6,
372CESTER_TEST(ewp7_y0_x4_right_vertex, gpu_raster_phase6,
377CESTER_TEST(ewp7_y4_x2_integer_right, gpu_raster_phase6,
383CESTER_TEST(ewp7_y4_x3_integer_excluded, gpu_raster_phase6,
389CESTER_TEST(ewp7_y8_x1_integer_right, gpu_raster_phase6,
400CESTER_TEST(ewp7_y12_x0_integer_right, gpu_raster_phase6,
406CESTER_TEST(ewp7_y12_x1_excluded, gpu_raster_phase6,
411CESTER_TEST(ewp7_y14_narrow_x0_kept, gpu_raster_phase6,
417CESTER_TEST(ewp7_y15_narrow_x0_kept, gpu_raster_phase6,
423CESTER_TEST(ewp7_y16_bottom_excluded, gpu_raster_phase6,
CESTER_BODY(static int s_got40;static int s_got80;static uint32_t s_cause;static uint32_t s_epc;static uint32_t s_from;static uint32_t *s_resume;static uint32_t *s_regs;static uint32_t(*s_customhandler)()=NULL;static uint32_t s_oldIMASK;static uint32_t s_oldDPCR;static uint32_t s_oldDICR;uint32_t handler(uint32_t *regs, uint32_t from) { if(from==0x40) s_got40=1;if(from==0x80) s_got80=1;uint32_t cause;uint32_t epc;s_from=from;asm("mfc0 %0, $13\nnop\nmfc0 %1, $14\nnop" :"=r"(cause), "=r"(epc));s_cause=cause;s_epc=epc;if(s_customhandler) { return s_customhandler();} else { return s_resume ?((uint32_t) s_resume) :(epc+4);} } void installExceptionHandlers(uint32_t(*handler)(uint32_t *regs, uint32_t from));void uninstallExceptionHandlers();uint32_t branchbranch1();uint32_t branchbranch2();uint32_t jumpjump1();uint32_t jumpjump2();uint32_t cpu_LWR_LWL_half(uint32_t buff[], uint32_t initial);uint32_t cpu_LWR_LWL_nodelay(uint32_t buff[], uint32_t initial);uint32_t cpu_LWR_LWL_delayed(uint32_t buff[], uint32_t initial);uint32_t cpu_LWR_LWL_load_different(uint32_t buff[], uint32_t initial);uint32_t cpu_LW_LWR(uint32_t buff[], uint32_t initial);uint32_t cpu_delayed_load(uint32_t buff[], uint32_t override);uint32_t cpu_delayed_load_cancelled(uint32_t buff[], uint32_t override);uint64_t cpu_delayed_load_load(uint32_t buff[], uint32_t override);uint32_t linkandload();uint32_t lwandlink();uint32_t nolink();static int s_interruptsWereEnabled;) CESTER_BEFORE_EACH(cpu_tests
CESTER_TEST(cpu_cop0_basic_write_bp, cpu_tests, uint32_t expectedEPC;uint32_t t;volatile uint32_t *ptr=(volatile uint32_t *) 0x58; *ptr=1;__asm__ volatile("" " lui %0, 0b1100101010000000\n" " mtc0 %0, $7\n" " li %0, 0x58\n" " mtc0 %0, $5\n" " li %0, 0xfffffff0\n" " mtc0 %0, $9\n" :"=r"(t));cester_assert_uint_eq(1, *ptr);__asm__ volatile("la %0, 1f\n1:\nsw $0, 0x58($0)" :"=r"(expectedEPC));__asm__ volatile("mtc0 $0, $7\n");cester_assert_uint_eq(0, *ptr);cester_assert_uint_eq(1, s_got40);cester_assert_uint_eq(0, s_got80);cester_assert_uint_eq(0x40, s_from);cester_assert_uint_eq(expectedEPC, s_epc);) CESTER_TEST(cpu_cop0_kseg_write_bp
#define RASTER_VRAM_GREEN
Definition raster-helpers.h:126
#define RASTER_VRAM_BLUE
Definition raster-helpers.h:128
#define RASTER_VRAM_WHITE
Definition raster-helpers.h:130
#define ASSERT_PIXEL_UNTOUCHED(x_, y_)
Definition raster-helpers.h:485
#define RASTER_VRAM_RED
Definition raster-helpers.h:124
#define RASTER_CMD_BLUE
Definition raster-helpers.h:127
#define RASTER_CMD_RED
Definition raster-helpers.h:123
#define RASTER_CMD_WHITE
Definition raster-helpers.h:129
#define RASTER_CMD_GREEN
Definition raster-helpers.h:125
#define ASSERT_PIXEL_EQ(expected, x_, y_)
Definition raster-helpers.h:472