Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-46920: Remove code made dead long ago with #if 0 #31681

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restore an original copy of libffi
  • Loading branch information
arhadthedev committed Mar 5, 2022
commit f9b4ef00b3162bf107c0503f0f4ef058bebfa6d2
10 changes: 10 additions & 0 deletions Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c
Original file line number Diff line number Diff line change
@@ -37,9 +37,19 @@
#include <ppc-darwin.h>
#include <architecture/ppc/mode_independent_asm.h>

#if 0
#if defined(POWERPC_DARWIN)
#include <libkern/OSCacheControl.h> // for sys_icache_invalidate()
#endif

#else

#pragma weak sys_icache_invalidate
extern void sys_icache_invalidate(void *start, size_t len);

#endif


extern void ffi_closure_ASM(void);

// The layout of a function descriptor. A C function pointer really
9 changes: 9 additions & 0 deletions Modules/_ctypes/libffi_osx/x86/x86-ffi64.c
Original file line number Diff line number Diff line change
@@ -152,6 +152,14 @@ classify_argument(
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_POINTER:
#if 0
if (byte_offset + type->size <= 4)
classes[0] = X86_64_INTEGERSI_CLASS;
else
classes[0] = X86_64_INTEGER_CLASS;

return 1;
#else
{
int size = byte_offset + type->size;

@@ -179,6 +187,7 @@ classify_argument(
else
FFI_ASSERT (0);
}
#endif

case FFI_TYPE_FLOAT:
if (byte_offset == 0)