Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THUMB_DIV_MOD_BODY problem with standard arm assembler when building llvm-gcc frontend #2917

Closed
llvmbot opened this issue Jul 12, 2008 · 4 comments
Labels
bugzilla Issues migrated from bugzilla llvm-tools All llvm tools that do not have corresponding tag

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 12, 2008

Bugzilla Link 2545
Resolution FIXED
Resolved on Mar 19, 2009 13:07
Version 2.3
OS Linux
Attachments Fix for thumb_div_mod_body
Reporter LLVM Bugzilla Contributor

Extended Description

Hi,

When building the llvm-gcc frontend for an ARM cross compiler I ran into the following error:

-c ../../llvm-gcc4.2-2.3.source/gcc/config/arm/lib1funcs.asm -o libgcc/thumb/_udivsi3.o
../../llvm-gcc4.2-2.3.source/gcc/config/arm/lib1funcs.asm: Assembler messages:
../../llvm-gcc4.2-2.3.source/gcc/config/arm/lib1funcs.asm:847: Error: bad instruction `thumb_div_mod_body 0'

It seems that apple's arm assembler behaves differently. Changing THUMB_DIV_MOD_BODY 0 into THUMB_DIV_MOD_BODY(0) seems to fix the problem when using the standard arm assembler from binutils.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 16, 2008

Hi,

I also add the same problem and changing THUMB_DIV_MOD_BODY 0 into THUMB_DIV_MOD_BODY(0) actually fix it using standard arm binutils.

Created an attachment (id=1830) [details]
Fix for thumb_div_mod_body

Hi,

When building the llvm-gcc frontend for an ARM cross compiler I ran into the
following error:

-c ../../llvm-gcc4.2-2.3.source/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_udivsi3.o
../../llvm-gcc4.2-2.3.source/gcc/config/arm/lib1funcs.asm: Assembler messages:
../../llvm-gcc4.2-2.3.source/gcc/config/arm/lib1funcs.asm:847: Error: bad
instruction `thumb_div_mod_body 0'

It seems that apple's arm assembler behaves differently. Changing
THUMB_DIV_MOD_BODY 0 into THUMB_DIV_MOD_BODY(0) seems to fix the problem when
using the standard arm assembler from binutils.

@lattner
Copy link
Collaborator

lattner commented Jul 16, 2008

FWIW, I'm fine with applying the patch.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Mar 19, 2009

Submitted Adam's patch with LLVM LOCAL markers; this was reviewed as well by Dale Johannesen on llvm-dev.

@lattner
Copy link
Collaborator

lattner commented Mar 19, 2009

Thanks Misha!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm-tools All llvm tools that do not have corresponding tag
Projects
None yet
Development

No branches or pull requests

2 participants