Bug 920992 - Specify alignments explicitly in assembly codes. r=derf
authorTing-Yuan Huang <thuang@mozilla.com>
Wed, 30 Oct 2013 15:21:52 -0400
changeset 152762 08826e162b8a57ae2776750028fccdc95cc916b9
parent 152761 38f366acb59b827ea8805789197fcbf7644e2785
child 152763 cc37dd2cd76916f7a17cc29877cb202236373554
push id25559
push userryanvm@gmail.com
push dateThu, 31 Oct 2013 02:37:04 +0000
treeherdermozilla-central@f0d363d72753 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersderf
bugs920992
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 920992 - Specify alignments explicitly in assembly codes. r=derf
media/libtheora/bug920992.patch
media/libtheora/lib/arm/armbits.s
media/libtheora/lib/arm/armfrag.s
media/libtheora/lib/arm/armidct.s
media/libtheora/lib/arm/armloop.s
media/libtheora/update.sh
new file mode 100644
--- /dev/null
+++ b/media/libtheora/bug920992.patch
@@ -0,0 +1,103 @@
+diff --git a/media/libtheora/lib/arm/armbits.s b/media/libtheora/lib/arm/armbits.s
+--- a/media/libtheora/lib/arm/armbits.s
++++ b/media/libtheora/lib/arm/armbits.s
+@@ -12,16 +12,22 @@
+ ;
+ ; function:
+ ;   last mod: $Id: armbits.s 17481 2010-10-03 22:49:42Z tterribe $
+ ;
+ ;********************************************************************
+ 
+ 	AREA	|.text|, CODE, READONLY
+ 
++	; Explicitly specifying alignment here because some versions of
++	; gas don't align code correctly. See
++	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
++	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
++	ALIGN
++
+ 	EXPORT oc_pack_read_arm
+ 	EXPORT oc_pack_read1_arm
+ 	EXPORT oc_huff_token_decode_arm
+ 
+ oc_pack_read1_arm PROC
+ 	; r0 = oc_pack_buf *_b
+ 	ADD r12,r0,#8
+ 	LDMIA r12,{r2,r3}      ; r2 = window
+diff --git a/media/libtheora/lib/arm/armfrag.s b/media/libtheora/lib/arm/armfrag.s
+--- a/media/libtheora/lib/arm/armfrag.s
++++ b/media/libtheora/lib/arm/armfrag.s
+@@ -11,16 +11,22 @@
+ ;********************************************************************
+ ; Original implementation:
+ ;  Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
+ ; last mod: $Id: armfrag.s 17481 2010-10-03 22:49:42Z tterribe $
+ ;********************************************************************
+ 
+ 	AREA	|.text|, CODE, READONLY
+ 
++	; Explicitly specifying alignment here because some versions of
++	; gas don't align code correctly. See
++	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
++	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
++	ALIGN
++
+ 	GET	armopts.s
+ 
+ ; Vanilla ARM v4 versions
+ 	EXPORT	oc_frag_copy_list_arm
+ 	EXPORT	oc_frag_recon_intra_arm
+ 	EXPORT	oc_frag_recon_inter_arm
+ 	EXPORT	oc_frag_recon_inter2_arm
+ 
+diff --git a/media/libtheora/lib/arm/armidct.s b/media/libtheora/lib/arm/armidct.s
+--- a/media/libtheora/lib/arm/armidct.s
++++ b/media/libtheora/lib/arm/armidct.s
+@@ -11,16 +11,22 @@
+ ;********************************************************************
+ ; Original implementation:
+ ;  Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
+ ; last mod: $Id: armidct.s 17481 2010-10-03 22:49:42Z tterribe $
+ ;********************************************************************
+ 
+ 	AREA	|.text|, CODE, READONLY
+ 
++	; Explicitly specifying alignment here because some versions of
++	; gas don't align code correctly. See
++	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
++	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
++	ALIGN
++
+ 	GET	armopts.s
+ 
+ 	EXPORT	oc_idct8x8_1_arm
+ 	EXPORT	oc_idct8x8_arm
+ 
+ oc_idct8x8_1_arm PROC
+ 	; r0 = ogg_int16_t  *_y
+ 	; r1 = ogg_uint16_t  _dc
+diff --git a/media/libtheora/lib/arm/armloop.s b/media/libtheora/lib/arm/armloop.s
+--- a/media/libtheora/lib/arm/armloop.s
++++ b/media/libtheora/lib/arm/armloop.s
+@@ -11,16 +11,22 @@
+ ;********************************************************************
+ ; Original implementation:
+ ;  Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
+ ; last mod: $Id: armloop.s 17481 2010-10-03 22:49:42Z tterribe $
+ ;********************************************************************
+ 
+ 	AREA	|.text|, CODE, READONLY
+ 
++	; Explicitly specifying alignment here because some versions of
++	; gas don't align code correctly. See
++	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
++	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
++	ALIGN
++
+ 	GET	armopts.s
+ 
+ 	EXPORT	oc_loop_filter_frag_rows_arm
+ 
+ ; Which bit this is depends on the order of packing within a bitfield.
+ ; Hopefully that doesn't change among any of the relevant compilers.
+ OC_FRAG_CODED_FLAG	*	1
--- a/media/libtheora/lib/arm/armbits.s
+++ b/media/libtheora/lib/arm/armbits.s
@@ -12,16 +12,22 @@
 ;
 ; function:
 ;   last mod: $Id: armbits.s 17481 2010-10-03 22:49:42Z tterribe $
 ;
 ;********************************************************************
 
 	AREA	|.text|, CODE, READONLY
 
+	; Explicitly specifying alignment here because some versions of
+	; gas don't align code correctly. See
+	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
+	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
+	ALIGN
+
 	EXPORT oc_pack_read_arm
 	EXPORT oc_pack_read1_arm
 	EXPORT oc_huff_token_decode_arm
 
 oc_pack_read1_arm PROC
 	; r0 = oc_pack_buf *_b
 	ADD r12,r0,#8
 	LDMIA r12,{r2,r3}      ; r2 = window
--- a/media/libtheora/lib/arm/armfrag.s
+++ b/media/libtheora/lib/arm/armfrag.s
@@ -11,16 +11,22 @@
 ;********************************************************************
 ; Original implementation:
 ;  Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
 ; last mod: $Id: armfrag.s 17481 2010-10-03 22:49:42Z tterribe $
 ;********************************************************************
 
 	AREA	|.text|, CODE, READONLY
 
+	; Explicitly specifying alignment here because some versions of
+	; gas don't align code correctly. See
+	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
+	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
+	ALIGN
+
 	GET	armopts.s
 
 ; Vanilla ARM v4 versions
 	EXPORT	oc_frag_copy_list_arm
 	EXPORT	oc_frag_recon_intra_arm
 	EXPORT	oc_frag_recon_inter_arm
 	EXPORT	oc_frag_recon_inter2_arm
 
--- a/media/libtheora/lib/arm/armidct.s
+++ b/media/libtheora/lib/arm/armidct.s
@@ -11,16 +11,22 @@
 ;********************************************************************
 ; Original implementation:
 ;  Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
 ; last mod: $Id: armidct.s 17481 2010-10-03 22:49:42Z tterribe $
 ;********************************************************************
 
 	AREA	|.text|, CODE, READONLY
 
+	; Explicitly specifying alignment here because some versions of
+	; gas don't align code correctly. See
+	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
+	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
+	ALIGN
+
 	GET	armopts.s
 
 	EXPORT	oc_idct8x8_1_arm
 	EXPORT	oc_idct8x8_arm
 
 oc_idct8x8_1_arm PROC
 	; r0 = ogg_int16_t  *_y
 	; r1 = ogg_uint16_t  _dc
--- a/media/libtheora/lib/arm/armloop.s
+++ b/media/libtheora/lib/arm/armloop.s
@@ -11,16 +11,22 @@
 ;********************************************************************
 ; Original implementation:
 ;  Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
 ; last mod: $Id: armloop.s 17481 2010-10-03 22:49:42Z tterribe $
 ;********************************************************************
 
 	AREA	|.text|, CODE, READONLY
 
+	; Explicitly specifying alignment here because some versions of
+	; gas don't align code correctly. See
+	; http://lists.gnu.org/archive/html/bug-binutils/2011-06/msg00199.html
+	; https://bugzilla.mozilla.org/show_bug.cgi?id=920992
+	ALIGN
+
 	GET	armopts.s
 
 	EXPORT	oc_loop_filter_frag_rows_arm
 
 ; Which bit this is depends on the order of packing within a bitfield.
 ; Hopefully that doesn't change among any of the relevant compilers.
 OC_FRAG_CODED_FLAG	*	1
 
--- a/media/libtheora/update.sh
+++ b/media/libtheora/update.sh
@@ -78,8 +78,9 @@ cp $1/include/theora/theora.h ./include/
 cp $1/include/theora/theoradec.h ./include/theora/theoradec.h
 cp $1/include/theora/theoraenc.h ./include/theora/theoraenc.h
 cp $1/include/theora/codec.h ./include/theora/codec.h
 patch -p3 < ./bug625773-r17780.patch
 patch -p3 < ./bug468275-r18219.patch
 patch -p3 < ./bug752139-r18031.patch
 patch -p3 < ./bug752668-r18268.patch
 patch -p3 < ./bug703135.patch
+patch -p3 < ./bug920992.patch