mirror of
https://github.com/open-goal/jak-project
synced 2026-09-01 09:53:12 -04:00
de25f39439
Got OpenGOAL building and running natively on Apple Silicon. This is the rest of the port after the smaller arm64 emitter PRs. I was told pushing one big PR was okay. This covers goalc, the runtime, linker, kernel and the GOAL asm. The new paths have native tests. I also found four more emitter bugs while running it. They're in scalar sqrt, 128-bit stores, scalar max and indexed stores above 4 GB. Spent a while cleaning it up so it's easier to read. 4am gotta sleep lol Closes #3841 --------- Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
21 lines
477 B
C++
21 lines
477 B
C++
#pragma once
|
|
|
|
#include "common/common_types.h"
|
|
#include "common/util/Assert.h"
|
|
|
|
namespace arm64 {
|
|
|
|
constexpr u32 encode_movz_64(u32 reg, u16 value, u32 halfword) {
|
|
ASSERT(reg < 32);
|
|
ASSERT(halfword < 4);
|
|
return 0xd2800000 | (halfword << 21) | (u32(value) << 5) | reg;
|
|
}
|
|
|
|
constexpr u32 encode_movk_64(u32 reg, u16 value, u32 halfword) {
|
|
ASSERT(reg < 32);
|
|
ASSERT(halfword < 4);
|
|
return 0xf2800000 | (halfword << 21) | (u32(value) << 5) | reg;
|
|
}
|
|
|
|
} // namespace arm64
|