Commit b5fda574 authored by Sam Hocevar's avatar Sam Hocevar
Browse files

* common/i386: factored the .rodata section declaration into i386inc.asm.


git-svn-id: svn://svn.videolan.org/x264/trunk@449 df754926-b1dd-0310-bc7b-ec298dee348c
parent 17683d75
......@@ -120,11 +120,7 @@ BITS 32
; Local Data (Read Only)
;=============================================================================
%ifdef FORMAT_COFF
SECTION .rodata data
%else
SECTION .rodata data align=16
%endif
SECTION_RODATA
;-----------------------------------------------------------------------------
; Various memory constants (trigonometric values or rounding values)
......
......@@ -24,7 +24,7 @@ BITS 32
%include "i386inc.asm"
SECTION .rodata align=16
SECTION_RODATA
pb_01: times 16 db 0x01
pb_3f: times 16 db 0x3f
pb_ff: times 16 db 0xff
......
......@@ -26,6 +26,7 @@ BITS 32
; Macros and other preprocessor constants
;=============================================================================
; Symbol prefix for C linkage
%macro cglobal 1
%ifdef PREFIX
global _%1
......@@ -35,6 +36,17 @@ BITS 32
%endif
%endmacro
; Name of the .rodata section. On OS X we cannot use .rodata because NASM
; is unable to compute address offsets outside of .text so we use the .text
; section instead until NASM is fixed.
%macro SECTION_RODATA 0
%ifidn __OUTPUT_FORMAT__,macho
SECTION .text
%else
SECTION .rodata data align=16
%endif
%endmacro
; PIC support macros. All these macros are totally harmless when __PIC__ is
; not defined but can ruin everything if misused in PIC mode. On x86, shared
; objects cannot directly access global variables by address, they need to
......
......@@ -42,11 +42,7 @@ BITS 32
; Constants
;=============================================================================
%ifdef FORMAT_COFF
SECTION .rodata data
%else
SECTION .rodata data align=16
%endif
SECTION_RODATA
ALIGN 16
pw_4: times 4 dw 4
......
......@@ -30,7 +30,7 @@ BITS 32
; Read only data
;=============================================================================
SECTION .rodata data align=16
SECTION_RODATA
ALIGN 16
mmx_dw_one:
......
......@@ -28,11 +28,7 @@ BITS 32
%include "i386inc.asm"
%ifdef FORMAT_COFF
SECTION .rodata data
%else
SECTION .rodata data align=16
%endif
SECTION_RODATA
pd_0000ffff: times 4 dd 0x0000ffff
......
......@@ -52,7 +52,7 @@ BITS 32
%endmacro
SECTION .rodata data align=16
SECTION_RODATA
ALIGN 8
pw_2: times 4 dw 2
......
......@@ -35,7 +35,7 @@ BITS 32
%include "i386inc.asm"
SECTION .rodata
SECTION_RODATA
pd_1: times 2 dd 1
SECTION .text
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment