mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 15:28:58 -04:00
Merge pull request #756 from water111/w/u64-float-set
[goalc] support storing a float in a 64-bit memory location
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
(let ((a (new 'stack-no-clear 'array 'float 4))
|
||||
(b (new 'stack-no-clear 'array 'uint64 2))
|
||||
)
|
||||
(set! (-> b 0) #xbbbbbbbbbbbbbbbb)
|
||||
(set! (-> a 0) 12.0)
|
||||
(set! (-> b 0) (the-as uint (- (-> a 0))))
|
||||
(format #t "~f #x~X #x~X #x~X~%" (-> b 0) (-> b 0) (-> (the-as (pointer uint32) b) 0) (-> (the-as (pointer uint32) b) 1))
|
||||
)
|
||||
@@ -830,6 +830,11 @@ TEST_F(WithGameTests, GetEnumVals) {
|
||||
"(thing5 . #<invalid object #x5>))\n0\n"});
|
||||
}
|
||||
|
||||
TEST_F(WithGameTests, SetU64FromFloat) {
|
||||
runner.run_static_test(env, testCategory, "test-set-u64-from-float.gc",
|
||||
{"-12.0000 #xc1400000 #xc1400000 #x0\n0\n"});
|
||||
}
|
||||
|
||||
TEST(TypeConsistency, TypeConsistency) {
|
||||
Compiler compiler;
|
||||
compiler.enable_throw_on_redefines();
|
||||
|
||||
Reference in New Issue
Block a user