diff options
| author | Po Lu | 2023-01-25 22:07:51 +0800 |
|---|---|---|
| committer | Po Lu | 2023-01-25 22:07:51 +0800 |
| commit | 0b1ef9ea31ce039001546b3ed34494332e5e3629 (patch) | |
| tree | 3b3caec2303410053921aa76c1351349f013cedf /src/alloc.c | |
| parent | d3b29ccc89f2c14754e6b817da45b4c3f80e670f (diff) | |
| download | emacs-0b1ef9ea31ce039001546b3ed34494332e5e3629.tar.gz emacs-0b1ef9ea31ce039001546b3ed34494332e5e3629.zip | |
Update Android port
* java/org/gnu/emacs/EmacsDrawLine.java: Fix this again. Gosh,
how does Android do this.
* java/org/gnu/emacs/EmacsNoninteractive.java (main): Port to
Android 2.3.3.
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard): Port to Android 4.0.3.
* java/org/gnu/emacs/EmacsService.java (getClipboardManager):
New function.
* src/alloc.c (find_string_data_in_pure): Fix Android alignment
issue.
* src/android-emacs.c (main): Port to Android 4.4.
* src/android.c (initEmacs): Align stack to 32 bytes, so it ends
up aligned to 16 even though gcc thinks the stack is already
aligned to 16 bytes.
* src/callproc.c (init_callproc): Use /system/bin/sh instead of
/bin/sh by default.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index ed55ae32710..bc43f22005d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5662,6 +5662,22 @@ find_string_data_in_pure (const char *data, ptrdiff_t nbytes) | |||
| 5662 | if (pure_bytes_used_non_lisp <= nbytes) | 5662 | if (pure_bytes_used_non_lisp <= nbytes) |
| 5663 | return NULL; | 5663 | return NULL; |
| 5664 | 5664 | ||
| 5665 | /* The Android GCC generates code like: | ||
| 5666 | |||
| 5667 | 0xa539e755 <+52>: lea 0x430(%esp),%esi | ||
| 5668 | => 0xa539e75c <+59>: movdqa %xmm0,0x0(%ebp) | ||
| 5669 | 0xa539e761 <+64>: add $0x10,%ebp | ||
| 5670 | |||
| 5671 | but data is not aligned appropriately, so a GP fault results. */ | ||
| 5672 | |||
| 5673 | #if defined __i386__ \ | ||
| 5674 | && defined HAVE_ANDROID \ | ||
| 5675 | && !defined ANDROID_STUBIFY \ | ||
| 5676 | && !defined (__clang__) | ||
| 5677 | if ((intptr_t) data & 15) | ||
| 5678 | return NULL; | ||
| 5679 | #endif | ||
| 5680 | |||
| 5665 | /* Set up the Boyer-Moore table. */ | 5681 | /* Set up the Boyer-Moore table. */ |
| 5666 | skip = nbytes + 1; | 5682 | skip = nbytes + 1; |
| 5667 | for (i = 0; i < 256; i++) | 5683 | for (i = 0; i < 256; i++) |