[2/2] arm: Fix assembler offsets for apple/mach-o

Message ID 1312199319-7388-2-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö Aug. 1, 2011, 11:48 a.m.
---
 libavcodec/arm/asm-offsets.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Comments

Luca Barbato Aug. 1, 2011, 12:51 p.m. | #1
On 8/1/11 1:48 PM, Martin Storsjö wrote:
> ---
>   libavcodec/arm/asm-offsets.h |    9 +++++++++
>   1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/arm/asm-offsets.h b/libavcodec/arm/asm-offsets.h
> index 110d33d..3fc2c51 100644
> --- a/libavcodec/arm/asm-offsets.h
> +++ b/libavcodec/arm/asm-offsets.h
> @@ -29,11 +29,20 @@
>   #endif
>
>   /* MpegEncContext */
> +#if defined(__ARM_EABI__) || defined(__eabi__)
>   #define Y_DC_SCALE               0xb4
>   #define C_DC_SCALE               0xb8
>   #define AC_PRED                  0xbc
>   #define BLOCK_LAST_INDEX         0xc0
>   #define H263_AIC                 0xf0
>   #define INTER_SCANTAB_RASTER_END 0x138
> +#elif defined(__APPLE__)
> +#define Y_DC_SCALE               0xb0
> +#define C_DC_SCALE               0xb4
> +#define AC_PRED                  0xb8
> +#define BLOCK_LAST_INDEX         0xbc
> +#define H263_AIC                 0xec
> +#define INTER_SCANTAB_RASTER_END 0x134
> +#endif
>
>   #endif /* AVCODEC_ARM_ASM_OFFSETS_H */

If we shuffle the int64 down the struct we could have an unified offset 
again.

lu

Patch

diff --git a/libavcodec/arm/asm-offsets.h b/libavcodec/arm/asm-offsets.h
index 110d33d..3fc2c51 100644
--- a/libavcodec/arm/asm-offsets.h
+++ b/libavcodec/arm/asm-offsets.h
@@ -29,11 +29,20 @@ 
 #endif
 
 /* MpegEncContext */
+#if defined(__ARM_EABI__) || defined(__eabi__)
 #define Y_DC_SCALE               0xb4
 #define C_DC_SCALE               0xb8
 #define AC_PRED                  0xbc
 #define BLOCK_LAST_INDEX         0xc0
 #define H263_AIC                 0xf0
 #define INTER_SCANTAB_RASTER_END 0x138
+#elif defined(__APPLE__)
+#define Y_DC_SCALE               0xb0
+#define C_DC_SCALE               0xb4
+#define AC_PRED                  0xb8
+#define BLOCK_LAST_INDEX         0xbc
+#define H263_AIC                 0xec
+#define INTER_SCANTAB_RASTER_END 0x134
+#endif
 
 #endif /* AVCODEC_ARM_ASM_OFFSETS_H */