Add some GTE code

This commit is contained in:
2024-01-24 12:04:03 -05:00
parent 6f3b67fab8
commit 1922515228
5 changed files with 107 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include "gte_types.hpp"
namespace JabyEngine {
namespace GTE {
static __always_inline void ldv0(const SVECTOR& vector) {
__asm__ volatile("lwc2 $0, 0(%0)":: "r"(&vector));
__asm__ volatile("lwc2 $1, 4(%0)":: "r"(&vector));
}
static __always_inline void ldv1(const SVECTOR& vector) {
__asm__ volatile("lwc2 $2, 0(%0)":: "r"(&vector));
__asm__ volatile("lwc2 $3, 4(%0)":: "r"(&vector));
}
static __always_inline void ldv2(const SVECTOR& vector) {
__asm__ volatile("lwc2 $4, 0(%0)":: "r"(&vector));
__asm__ volatile("lwc2 $5, 4(%0)":: "r"(&vector));
}
}
}