Skip to content

Commit 99bad83

Browse files
committed
fixup
1 parent 209ea09 commit 99bad83

5 files changed

Lines changed: 29 additions & 41 deletions

File tree

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,7 @@ def bundled_ffi_supported(os_name, target_arch):
23142314
target_arch = 'ia32'
23152315

23162316
if target_arch in {'arm', 'arm64', 'ia32', 'x64', 'x86_64',
2317-
's390x', 'riscv64', 'loong64'}:
2317+
'riscv64', 'loong64'}:
23182318
return True
23192319

23202320
if target_arch in {'mips', 'mipsel', 'mips64el'}:

deps/libffi/generate-headers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ def get_target(os_name, target_arch):
4141
if target_arch == 'x64':
4242
return ('X86_WIN64' if os_name == 'win' else 'X86_64', 'x86')
4343

44-
if target_arch == 's390x':
45-
return ('S390', 's390')
46-
4744
if target_arch == 'riscv64':
4845
return ('RISCV', 'riscv')
4946

@@ -241,7 +238,6 @@ def detect_target_arch():
241238
'arm64': 'arm64',
242239
'aarch64': 'arm64',
243240
'arm': 'arm',
244-
's390x': 's390x',
245241
'riscv64': 'riscv64',
246242
'loong64': 'loong64',
247243
'ppc64': 'ppc64',

deps/libffi/libffi.gyp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,6 @@
8181
],
8282
},
8383
}],
84-
['target_arch == "s390x"', {
85-
'variables': {
86-
'libffi_arch_sources': [
87-
'src/s390/ffi.c',
88-
'src/s390/sysv.S',
89-
],
90-
},
91-
}],
9284
['target_arch == "riscv64"', {
9385
'variables': {
9486
'libffi_arch_sources': [
@@ -192,7 +184,6 @@
192184
'src/mips/ffitarget.h',
193185
'src/powerpc/ffitarget.h',
194186
'src/riscv/ffitarget.h',
195-
'src/s390/ffitarget.h',
196187
'src/x86/ffitarget.h',
197188
],
198189
'outputs': [

deps/libffi/src/s390/sysv.S

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ ffi_call_SYSV:
5050
st %r6,44(%r2) # Save registers
5151
stm %r12,%r14,48(%r2)
5252
lr %r13,%r2 # Install frame pointer
53-
.cfi_rel_offset %r6, 44
54-
.cfi_rel_offset %r12, 48
55-
.cfi_rel_offset %r13, 52
56-
.cfi_rel_offset %r14, 56
57-
.cfi_def_cfa_register %r13
53+
.cfi_rel_offset r6, 44
54+
.cfi_rel_offset r12, 48
55+
.cfi_rel_offset r13, 52
56+
.cfi_rel_offset r14, 56
57+
.cfi_def_cfa_register r13
5858
st %r2,0(%r15) # Set up back chain
5959
sla %r3,3 # ret_type *= 8
6060
lr %r12,%r4 # Save ret_addr
@@ -142,12 +142,12 @@ ffi_closure_SYSV:
142142
.Ldoclosure:
143143
stm %r12,%r15,48(%r15) # Save registers
144144
lr %r12,%r15
145-
.cfi_def_cfa_register %r12
146-
.cfi_rel_offset %r6, 24
147-
.cfi_rel_offset %r12, 48
148-
.cfi_rel_offset %r13, 52
149-
.cfi_rel_offset %r14, 56
150-
.cfi_rel_offset %r15, 60
145+
.cfi_def_cfa_register r12
146+
.cfi_rel_offset r6, 24
147+
.cfi_rel_offset r12, 48
148+
.cfi_rel_offset r13, 52
149+
.cfi_rel_offset r14, 56
150+
.cfi_rel_offset r15, 60
151151
#ifndef HAVE_AS_S390_ZARCH
152152
basr %r13,0 # Set up base register
153153
.Lcbase:
@@ -170,7 +170,7 @@ ffi_closure_SYSV:
170170
#endif
171171

172172
lr %r15,%r12
173-
.cfi_def_cfa_register %r15
173+
.cfi_def_cfa_register r15
174174
lm %r12,%r14,48(%r12) # Restore saved registers
175175
l %r6,24(%r15)
176176
ld %f0,64(%r15) # Load return registers
@@ -204,11 +204,11 @@ ffi_call_SYSV:
204204
stg %r6,88(%r2) # Save registers
205205
stmg %r12,%r14,96(%r2)
206206
lgr %r13,%r2 # Install frame pointer
207-
.cfi_rel_offset %r6, 88
208-
.cfi_rel_offset %r12, 96
209-
.cfi_rel_offset %r13, 104
210-
.cfi_rel_offset %r14, 112
211-
.cfi_def_cfa_register %r13
207+
.cfi_rel_offset r6, 88
208+
.cfi_rel_offset r12, 96
209+
.cfi_rel_offset r13, 104
210+
.cfi_rel_offset r14, 112
211+
.cfi_def_cfa_register r13
212212
stg %r2,0(%r15) # Set up back chain
213213
larl %r14,.Ltable # Set up return address
214214
slag %r3,%r3,3 # ret_type *= 8
@@ -253,10 +253,10 @@ ffi_call_SYSV:
253253
lg %r12,96(%r13)
254254
lg %r6,88(%r13)
255255
lg %r13,104(%r13)
256-
.cfi_restore %r14
257-
.cfi_restore %r13
258-
.cfi_restore %r12
259-
.cfi_restore %r6
256+
.cfi_restore r14
257+
.cfi_restore r13
258+
.cfi_restore r12
259+
.cfi_restore r6
260260
.cfi_def_cfa r15, 160
261261
br %r14
262262
.cfi_endproc
@@ -292,11 +292,11 @@ ffi_closure_SYSV:
292292
.Ldoclosure:
293293
stmg %r13,%r15,104(%r15) # Save registers
294294
lgr %r13,%r15
295-
.cfi_def_cfa_register %r13
296-
.cfi_rel_offset %r6, 48
297-
.cfi_rel_offset %r13, 104
298-
.cfi_rel_offset %r14, 112
299-
.cfi_rel_offset %r15, 120
295+
.cfi_def_cfa_register r13
296+
.cfi_rel_offset r6, 48
297+
.cfi_rel_offset r13, 104
298+
.cfi_rel_offset r14, 112
299+
.cfi_rel_offset r15, 120
300300
aghi %r15,-160-16 # Set up stack frame
301301
stg %r13,0(%r15) # Set up back chain
302302

@@ -311,7 +311,7 @@ ffi_closure_SYSV:
311311
brasl %r14,ffi_closure_helper_SYSV # Call helper
312312

313313
lgr %r15,%r13
314-
.cfi_def_cfa_register %r15
314+
.cfi_def_cfa_register r15
315315
lmg %r13,%r14,104(%r13) # Restore saved registers
316316
lg %r6,48(%r15)
317317
ld %f0,128(%r15) # Load return registers

doc/api/ffi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The unofficial GN build does not support `node:ffi`.
3737

3838
The following targets are not supported by bundled libffi:
3939

40+
* `s390x`.
4041
* `mips`, `mipsel`, and `mips64el` on targets other than FreeBSD, Linux, and
4142
OpenBSD.
4243
* `ppc64` on Android, CloudABI, iOS, OpenHarmony, OS/400, Solaris, and Windows.

0 commit comments

Comments
 (0)