Skip to content

Commit

Permalink
fixed the struct
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinWells committed May 9, 2024
1 parent e4a7aae commit 0a997b7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions runtime/libffi/z/sysvz64.s
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ ARGLOOP LG 11,0(10,5) Get pointer to current ffi_type

*Following code prepares ffi arguments, according to xplink

* technically, this isn't allowed
* but openJ9 uses ffi_type_void for void functions
* so support it since it doesn't break anything
* assuming we don't have something weird like a void type
* followed by real parameters
VOID DS 0H ffi_type_void
B CALL

I DS 0H ffi_type_int
UI32 DS 0H ffi_type_uint32
LA 15,I32
Expand Down Expand Up @@ -544,7 +552,7 @@ STFPCHKF202 DS 0H

AFI 6,8
AFI 15,-16 If struct is <24 bytes arg area
AFI 7,16 Needs padding to 24 bytes
AFI 7,8 Needs padding to 24 bytes

B STRCTLP

Expand All @@ -555,8 +563,8 @@ STFPCHKF224 DS 0H
AFI 14,2 two less FPRs available

AFI 6,8
AFI 15,-16 If struct is <24 bytes arg area
AFI 7,16 Needs padding to 24 bytes
AFI 15,-8 If struct is <24 bytes arg area
AFI 7,8 Needs padding to 24 bytes

B STRCTLP

Expand All @@ -568,8 +576,8 @@ STFPCHKF246 DS 0H
AFI 14,2 two less FPRs available

AFI 6,8
AFI 15,-16 If struct is <24 bytes arg area
AFI 7,16 Needs padding to 24 bytes
AFI 15,-8 If struct is <24 bytes arg area
AFI 7,8 Needs padding to 24 bytes

B STRCTLP

Expand Down Expand Up @@ -1042,7 +1050,7 @@ ATABLE DC A(I) Labels for parm types
DC A(UI64)
DC A(FLT)
DC A(STRCT)
DC A(0)
DC A(VOID)
DC A(I)
DC A(D)
I32 DC A(IGPR1) Labels for passing INT in gpr
Expand Down

0 comments on commit 0a997b7

Please sign in to comment.