All of lore.kernel.org
 help / color / mirror / Atom feed
* arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
@ 2013-11-13 14:49 Colin Watson
  2013-11-13 15:15 ` arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4' Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-13 15:22 ` arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' Leif Lindholm
  0 siblings, 2 replies; 8+ messages in thread
From: Colin Watson @ 2013-11-13 14:49 UTC (permalink / raw)
  To: grub-devel

After my previous fix, arm-uboot still fails to build with:

  arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wall -W -I../../../include -I../include  -DGRUB_MACHINE_UBOOT=1 -DGRUB_MACHINE_ARM=1 -DGRUB_MACHINE=ARM_UBOOT -DGRUB_TARGET_CPU_ARM=1 -nostdinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/include -DGRUB_FILE=\"lib/arg.c\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/include -I../../../grub-core/lib/libgcrypt-grub/src/   -DGRUB_KERNEL=1   -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -freg-struct-return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -mno-unaligned-access -Wtrampolines -Werror -DUSE_ASCII_FALLBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1     -mthumb-interwork -mlong-calls -ffreestanding   -MT lib/kernel_exec-arg.o -MD -MP -MF lib/.deps-core/kernel_exec-arg.Tpo -c -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '../../../grub-core/'`lib/arg.c
  misc.S: Assembler messages:
  misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
  make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1

I don't think SP can be used that way in Thumb mode?

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4'
  2013-11-13 14:49 arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' Colin Watson
@ 2013-11-13 15:15 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-13 15:36   ` Leif Lindholm
  2013-11-13 15:22 ` arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' Leif Lindholm
  1 sibling, 1 reply; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-13 15:15 UTC (permalink / raw)
  To: The development of GNU GRUB


[-- Attachment #1.1: Type: text/plain, Size: 2350 bytes --]

On 13.11.2013 15:49, Colin Watson wrote:
> After my previous fix, arm-uboot still fails to build with:
> 
>   arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wall -W -I../../../include -I../include  -DGRUB_MACHINE_UBOOT=1 -DGRUB_MACHINE_ARM=1 -DGRUB_MACHINE=ARM_UBOOT -DGRUB_TARGET_CPU_ARM=1 -nostdinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/include -DGRUB_FILE=\"lib/arg.c\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/include -I../../../grub-core/lib/libgcrypt-grub/src/   -DGRUB_KERNEL=1   -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-ar
ith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -freg-struct-return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -mno-unaligned-access -Wtrampolines -Werror -DUSE_ASCII_FALLBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1     -mthumb-interwork -mlong-calls -ffreestanding   -MT lib/kernel_exec-arg.o -MD -MP -MF lib/.deps-core/kernel_exec-arg.Tpo -c -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '../../../grub-core/'`lib/arg.c
>   misc.S: Assembler messages:
>   misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
>   make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1
> 
> I don't think SP can be used that way in Thumb mode?
> 
I think that our asm routines should be in full ARM. Attached patch
follows this strategy. One remaining problem is to make sure that thumb
flags in TARGET_CFLAGS and TARGET_CCASFLAGS match.

[-- Attachment #1.2: arm.diff --]
[-- Type: application/x-patch, Size: 6427 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
  2013-11-13 14:49 arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' Colin Watson
  2013-11-13 15:15 ` arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4' Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-13 15:22 ` Leif Lindholm
  1 sibling, 0 replies; 8+ messages in thread
From: Leif Lindholm @ 2013-11-13 15:22 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, Nov 13, 2013 at 02:49:19PM +0000, Colin Watson wrote:
> After my previous fix, arm-uboot still fails to build with:
> 
>   arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wall -W -I../../../include -I../include  -DGRUB_MACHINE_UBOOT=1 -DGRUB_MACHINE_ARM=1 -DGRUB_MACHINE=ARM_UBOOT -DGRUB_TARGET_CPU_ARM=1 -nostdinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/include -DGRUB_FILE=\"lib/arg.c\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/include -I../../../grub-core/lib/libgcrypt-grub/src/   -DGRUB_KERNEL=1   -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -freg-struct-return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -mno-unaligned-access -Wtrampolines -Werror -DUSE_ASCII_FALLBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1     -mthumb-interwork -mlong-calls -ffreestanding   -MT lib/kernel_exec-arg.o -MD -MP -MF lib/.deps-core/kernel_exec-arg.Tpo -c -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '../../../grub-core/'`lib/arg.c
>   misc.S: Assembler messages:
>   misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
>   make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1
> 
> I don't think SP can be used that way in Thumb mode?

No, you would need to insert a
    mov sp, fp
and then change to
    sub sp, sp, #4

/
    Leif


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4'
  2013-11-13 15:15 ` arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4' Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-13 15:36   ` Leif Lindholm
  2013-11-13 15:45     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 8+ messages in thread
From: Leif Lindholm @ 2013-11-13 15:36 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, Nov 13, 2013 at 04:15:53PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 13.11.2013 15:49, Colin Watson wrote:
> > After my previous fix, arm-uboot still fails to build with:
> > 
> >   arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wall -W -I../../../include -I../include  -DGRUB_MACHINE_UBOOT=1 -DGRUB_MACHINE_ARM=1 -DGRUB_MACHINE=ARM_UBOOT -DGRUB_TARGET_CPU_ARM=1 -nostdinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/include -DGRUB_FILE=\"lib/arg.c\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/include -I../../../grub-core/lib/libgcrypt-grub/src/   -DGRUB_KERNEL=1   -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-ar
> ith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -freg-struct-return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -mno-unaligned-access -Wtrampolines -Werror -DUSE_ASCII_FALLBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1     -mthumb-interwork -mlong-calls -ffreestanding   -MT lib/kernel_exec-arg.o -MD -MP -MF lib/.deps-core/kernel_exec-arg.Tpo -c -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '../../../grub-core/'`lib/arg.c
> >   misc.S: Assembler messages:
> >   misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
> >   make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1
> > 
> > I don't think SP can be used that way in Thumb mode?
> > 
> I think that our asm routines should be in full ARM. Attached patch
> follows this strategy. One remaining problem is to make sure that thumb
> flags in TARGET_CFLAGS and TARGET_CCASFLAGS match.

There should be no need for this - the only thing is to ensure the
-mthumb-interwork is set in CCASFLAGS_PLATFORM as well as
CFLAGS_PLATFORM, and even that is just to prevent linker warnings..

There is no special ARM_PROLOGUE needed, and (on armv5te onwards)
pop {..., pc} is an interworking branch.

If we want to force a file to build as ARM (which I'm not sure is
necessary now that we have split up armv6 separate from later
architectures), all that is required is a .arm directive up top.

/
    Leif


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4'
  2013-11-13 15:36   ` Leif Lindholm
@ 2013-11-13 15:45     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-13 16:05       ` Leif Lindholm
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-13 15:45 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 3354 bytes --]

On 13.11.2013 16:36, Leif Lindholm wrote:
> On Wed, Nov 13, 2013 at 04:15:53PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> On 13.11.2013 15:49, Colin Watson wrote:
>>> After my previous fix, arm-uboot still fails to build with:
>>>
>>>   arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..  -Wall -W -I../../../include -I../include  -DGRUB_MACHINE_UBOOT=1 -DGRUB_MACHINE_ARM=1 -DGRUB_MACHINE=ARM_UBOOT -DGRUB_TARGET_CPU_ARM=1 -nostdinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/include -DGRUB_FILE=\"lib/arg.c\" -I. -I../../../grub-core -I.. -I../../.. -I../../../include -I../include -I../../../grub-core/lib/libgcrypt-grub/include -I../../../grub-core/lib/libgcrypt-grub/src/   -DGRUB_KERNEL=1   -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-
ar
>> ith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -freg-struct-return -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -mno-unaligned-access -Wtrampolines -Werror -DUSE_ASCII_FALLBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1     -mthumb-interwork -mlong-calls -ffreestanding   -MT lib/kernel_exec-arg.o -MD -MP -MF lib/.deps-core/kernel_exec-arg.Tpo -c -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '../../../grub-core/'`lib/arg.c
>>>   misc.S: Assembler messages:
>>>   misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
>>>   make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1
>>>
>>> I don't think SP can be used that way in Thumb mode?
>>>
>> I think that our asm routines should be in full ARM. Attached patch
>> follows this strategy. One remaining problem is to make sure that thumb
>> flags in TARGET_CFLAGS and TARGET_CCASFLAGS match.
> 
> There should be no need for this - the only thing is to ensure the
> -mthumb-interwork is set in CCASFLAGS_PLATFORM as well as
> CFLAGS_PLATFORM, and even that is just to prevent linker warnings..
> 
> There is no special ARM_PROLOGUE needed, and (on armv5te onwards)
> pop {..., pc} is an interworking branch.
> 
> If we want to force a file to build as ARM (which I'm not sure is
> necessary now that we have split up armv6 separate from later
> architectures), all that is required is a .arm directive up top.
> 
Hm. I'm confused. According to
http://stuff.mit.edu/afs/sipb/project/egcs/src/egcs/gcc/config/arm/README-interworking:
"Note that specifying -mthumb-interwork does result in slightly larger,
slower code being produced.  This is why interworking support must be
specifically enabled by a switch."



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4'
  2013-11-13 15:45     ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-13 16:05       ` Leif Lindholm
  2013-11-14  0:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 8+ messages in thread
From: Leif Lindholm @ 2013-11-13 16:05 UTC (permalink / raw)
  To: The development of GNU GRUB

On Wed, Nov 13, 2013 at 04:45:00PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> >>>   misc.S: Assembler messages:
> >>>   misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
> >>>   make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1
> >>>
> >>> I don't think SP can be used that way in Thumb mode?
> >>>
> >> I think that our asm routines should be in full ARM. Attached patch
> >> follows this strategy. One remaining problem is to make sure that thumb
> >> flags in TARGET_CFLAGS and TARGET_CCASFLAGS match.
> > 
> > There should be no need for this - the only thing is to ensure the
> > -mthumb-interwork is set in CCASFLAGS_PLATFORM as well as
> > CFLAGS_PLATFORM, and even that is just to prevent linker warnings..
> > 
> > There is no special ARM_PROLOGUE needed, and (on armv5te onwards)
> > pop {..., pc} is an interworking branch.
> > 
> > If we want to force a file to build as ARM (which I'm not sure is
> > necessary now that we have split up armv6 separate from later
> > architectures), all that is required is a .arm directive up top.
> > 
> Hm. I'm confused. According to
> http://stuff.mit.edu/afs/sipb/project/egcs/src/egcs/gcc/config/arm/README-interworking:
> "Note that specifying -mthumb-interwork does result in slightly larger,
> slower code being produced.  This is why interworking support must be
> specifically enabled by a switch."

That is fairly outdated documentation (1998).
Yes, it was true before armv5te.

Since then, pop {pc} has been valid, so different code sequences are no
longer required for state changes than for normal subroutine calls.

/
    Leif


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4'
  2013-11-13 16:05       ` Leif Lindholm
@ 2013-11-14  0:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-11-14 10:45           ` Leif Lindholm
  0 siblings, 1 reply; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-14  0:24 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]

On 13.11.2013 17:05, Leif Lindholm wrote:
> On Wed, Nov 13, 2013 at 04:45:00PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>>>>   misc.S: Assembler messages:
>>>>>   misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4'
>>>>>   make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1
>>>>>
>>>>> I don't think SP can be used that way in Thumb mode?
>>>>>
>>>> I think that our asm routines should be in full ARM. Attached patch
>>>> follows this strategy. One remaining problem is to make sure that thumb
>>>> flags in TARGET_CFLAGS and TARGET_CCASFLAGS match.
>>>
>>> There should be no need for this - the only thing is to ensure the
>>> -mthumb-interwork is set in CCASFLAGS_PLATFORM as well as
>>> CFLAGS_PLATFORM, and even that is just to prevent linker warnings..
>>>
>>> There is no special ARM_PROLOGUE needed, and (on armv5te onwards)
>>> pop {..., pc} is an interworking branch.
>>>
>>> If we want to force a file to build as ARM (which I'm not sure is
>>> necessary now that we have split up armv6 separate from later
>>> architectures), all that is required is a .arm directive up top.
>>>
>> Hm. I'm confused. According to
>> http://stuff.mit.edu/afs/sipb/project/egcs/src/egcs/gcc/config/arm/README-interworking:
>> "Note that specifying -mthumb-interwork does result in slightly larger,
>> slower code being produced.  This is why interworking support must be
>> specifically enabled by a switch."
> 
> That is fairly outdated documentation (1998).
> Yes, it was true before armv5te.
> 
Hm, the qemu board easiest to test uboot with is versatile pb with
arm926 with is armv5t. So no need to worry about this. So we require at
least armv5 and arm support. Any boards outside of those resuirement
which it makes any sense to support?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4'
  2013-11-14  0:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-11-14 10:45           ` Leif Lindholm
  0 siblings, 0 replies; 8+ messages in thread
From: Leif Lindholm @ 2013-11-14 10:45 UTC (permalink / raw)
  To: The development of GNU GRUB

On Thu, Nov 14, 2013 at 01:24:02AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> >> Hm. I'm confused. According to
> >> http://stuff.mit.edu/afs/sipb/project/egcs/src/egcs/gcc/config/arm/README-interworking:
> >> "Note that specifying -mthumb-interwork does result in slightly larger,
> >> slower code being produced.  This is why interworking support must be
> >> specifically enabled by a switch."
> > 
> > That is fairly outdated documentation (1998).
> > Yes, it was true before armv5te.
> > 
> Hm, the qemu board easiest to test uboot with is versatile pb with
> arm926 with is armv5t. So no need to worry about this. So we require at
> least armv5 and arm support. Any boards outside of those resuirement
> which it makes any sense to support?

I wouldn't have thought so, but then I'm not exactly on the
conservative side in that area. ARMv5 also includes things like the
original Sheevaplug.

/
    Leif


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-14 10:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 14:49 arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' Colin Watson
2013-11-13 15:15 ` arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4' Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-13 15:36   ` Leif Lindholm
2013-11-13 15:45     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-13 16:05       ` Leif Lindholm
2013-11-14  0:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14 10:45           ` Leif Lindholm
2013-11-13 15:22 ` arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' Leif Lindholm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.