Add seperation between ROTMATRIX and TRANSFERVECTOR

This commit is contained in:
2024-04-02 23:40:22 -05:00
parent 4da6772827
commit 1bf91b2d75
7 changed files with 73 additions and 132 deletions

View File

@@ -33,7 +33,7 @@ namespace JabyEngine {
}
// Load column vector of MATRIX to universal register
static __always_inline void ldclmv(const MATRIX& matrix, size_t col) {
static __always_inline void ldclmv(const ROTMATRIX& matrix, size_t col) {
__asm__ volatile("lhu $12, 0(%0)" :: "r"(reinterpret_cast<uintptr_t>(&matrix) + (col << 1)) : "$12", "$13", "$14");
__asm__ volatile("lhu $13, 6(%0)" :: "r"(reinterpret_cast<uintptr_t>(&matrix) + (col << 1)) : "$12", "$13", "$14");
__asm__ volatile("lhu $14, 12(%0)" :: "r"(reinterpret_cast<uintptr_t>(&matrix) + (col << 1)) : "$12", "$13", "$14");
@@ -50,7 +50,7 @@ namespace JabyEngine {
}
// Store MATRIX column from 16 bit universal register
static __always_inline void stclmv(MATRIX& matrix, size_t col) {
static __always_inline void stclmv(ROTMATRIX& matrix, size_t col) {
__asm__ volatile("mfc2 $12, $9" :: "r"(reinterpret_cast<uintptr_t>(&matrix) + (col << 1)) : "$12", "$13", "$14", "memory");
__asm__ volatile("mfc2 $13, $10" :: "r"(reinterpret_cast<uintptr_t>(&matrix) + (col << 1)) : "$12", "$13", "$14", "memory");
__asm__ volatile("mfc2 $14, $11" :: "r"(reinterpret_cast<uintptr_t>(&matrix) + (col << 1)) : "$12", "$13", "$14", "memory");