Skip to content

Commit

Permalink
add {,t}{a,arm64}ios machine types
Browse files Browse the repository at this point in the history
In support of racket/racket#5057
  • Loading branch information
Bogdanp committed Aug 19, 2024
1 parent 3d89d4e commit 2d58d12
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
10 changes: 7 additions & 3 deletions examples/socket.ss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@
;;; Requires from C library:
;;; close, dup, execl, fork, kill, listen, tmpnam, unlink
(case (machine-type)
[(i3le ti3le a6le ta6le) (load-shared-object "libc.so.6")]
[(i3osx ti3osx a6osx ta6osx) (load-shared-object "libc.dylib")]
[else (load-shared-object "libc.so")])
[(i3le ti3le a6le ta6le)
(load-shared-object "libc.so.6")]
[(i3osx ti3osx a6osx ta6osx arm64osx tarm64osx
a6ios ta6ios arm64ios tarm64ios)
(load-shared-object "libc.dylib")]
[else
(load-shared-object "libc.so")])

;;; basic C-library stuff

Expand Down
4 changes: 2 additions & 2 deletions mats/bytevector.ms
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
(case (machine-type)
[(i3le ti3le i3nt ti3nt a6nt ta6nt arm64nt tarm64nt i3ob ti3ob i3fb ti3fb i3nb ti3nb
i3osx ti3osx a6le ta6le a6nb ta6nb
a6osx ta6osx a6fb ta6fb a6ob ta6ob a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx
arm32le tarm32le arm64le tarm64le arm64osx tarm64osx rv64le trv64le
a6osx ta6osx a6ios ta6ios a6fb ta6fb a6ob ta6ob a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx
arm32le tarm32le arm64le tarm64le arm64osx tarm64osx arm64ios tarm64ios rv64le trv64le
la64le tla64le)
'little]
[(ppc32le tppc32le ppc32osx tppc32osx) 'big]
Expand Down
6 changes: 4 additions & 2 deletions mats/foreign.ms
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@
(error? (load-shared-object 3))
)
]
[(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx)
[(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx
a6ios ta6ios arm64ios tarm64ios)
(mat load-shared-object
(file-exists? foreign1.so)
(begin (load-shared-object foreign1.so) #t)
Expand Down Expand Up @@ -3091,7 +3092,8 @@
'(load-shared-object "libc.so.7")]
[(i3nt ti3nt a6nt ta6nt arm64nt tarm64nt)
'(load-shared-object "msvcrt.dll")]
[(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx)
[(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx
a6ios ta6ios arm64ios tarm64ios)
'(load-shared-object "libc.dylib")]
[(pb pb32l pb32b pb64l pb64b tpb tpb32l tpb32b tpb64l tpb64b)
'(let ([try-load (lambda (path)
Expand Down
2 changes: 1 addition & 1 deletion mats/misc.ms
Original file line number Diff line number Diff line change
Expand Up @@ -4685,7 +4685,7 @@
)

(unless (memq (machine-type) '(arm32le tarm32le arm64le tarm64le arm64osx tarm64osx ; timestamp counter tends to be priviledged on Arm
arm64nt tarm64nt
arm64ios tarm64ios arm64nt tarm64nt
pb pb32l pb32b pb64l pb64b tpb tpb32l tpb32b tpb64l tpb64b)) ; doesn't increment for pb
(mat $read-time-stamp-counter

Expand Down
4 changes: 2 additions & 2 deletions s/arm64.ss
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,7 @@
(define alignment-via-lookahead
(lambda (size types int* fp* fp-in-int? stack-align varargs-after k)
(constant-case machine-type-name
[(arm64osx tarm64osx)
[(arm64osx tarm64osx arm64ios tarm64ios)
(cond
[(eqv? 0 varargs-after) (k (align 8 size) 0 0)]
[else
Expand Down Expand Up @@ -2533,7 +2533,7 @@
(define rest-of
(lambda (regs n next-varargs-after)
(constant-case machine-type-name
[(arm64osx tarm64osx)
[(arm64osx tarm64osx arm64ios tarm64ios)
(cond
[(eqv? next-varargs-after 0)
;; All the rest go on the stack
Expand Down
4 changes: 3 additions & 1 deletion s/cmacros.ss
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
;; ---------------------------------------------------------------------
;; Version and machine types:

(define-constant scheme-version #x0a010001)
(define-constant scheme-version #x0a010002)

(define-syntax define-machine-types
(lambda (x)
Expand Down Expand Up @@ -391,6 +391,7 @@
i3gnu ti3gnu
a6nt ta6nt
a6osx ta6osx
a6ios ta6ios
a6le ta6le
a6fb ta6fb
a6ob ta6ob
Expand All @@ -407,6 +408,7 @@
arm32nb tarm32nb
arm64nt tarm64nt
arm64osx tarm64osx
arm64ios tarm64ios
arm64le tarm64le
arm64fb tarm64fb
arm64ob tarm64ob
Expand Down

0 comments on commit 2d58d12

Please sign in to comment.