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

Port IA32_flat assembly code no longer compiles correctly. #1121

Closed
Ryzee119 opened this issue Aug 16, 2024 · 3 comments
Closed

Port IA32_flat assembly code no longer compiles correctly. #1121

Ryzee119 opened this issue Aug 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Ryzee119
Copy link
Contributor

Ryzee119 commented Aug 16, 2024

Describe the bug
I have bisected to this commit 5fb9b50 which is simply a code formatting PR, however this must break some syntax within the assembly code

The problem appears to lie within portable/GCC/IA32_flat/ISR_Support.h which is included by portASM.S.

Compiling with gcc -m32 on current master I get the following. Going back one further commit works as expected.

lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S: Assembler messages:
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:179: Warning: no instruction mnemonic suffix given and no register operands; using default for `add'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:196: Warning: no instruction mnemonic suffix given and no register operands; using default for `sub'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:231: Error: unknown pseudo-op: `.'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:231: Error: no such instruction: `if 1==1'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:231: Error: invalid character '(' in mnemonic
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:231: Warning: no instruction mnemonic suffix given and no register operands; using default for `add'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:254: Warning: no instruction mnemonic suffix given and no register operands; using default for `sub'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:254: Error: junk `movl( % eax)' after register
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:254: Error: unknown pseudo-op: `.'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:254: Error: no such instruction: `if 1==1'
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:254: Error: invalid character '(' in mnemonic
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:254: Error: ".endif" without ".if"
lib/freertos_kernel/portable/GCC/IA32_flat/portASM.S:258: Error: ".endif" without ".if"

Target

  • i686-elf-gcc
  • custom x86 target

Host

  • Host OS: Windows 11 (WSL2 Ubuntu)

To Reproduce
Seems to only occur with configUSE_COMMON_INTERRUPT_ENTRY_POINT enabled. One line command to replicate:

gcc -m32 -march=pentium -c -o portASM.o portable/GCC/IA32_flat/portASM.S -Iexamples/template_configuration -DconfigUSE_COMMON_INTERRUPT_ENTRY_POINT=1 -DconfigSUPPORT_FPU=0

Expected behavior
Should compile. It works as expected if I go one commit back. ie to 01820d3

Screenshots
N/A

@Ryzee119 Ryzee119 added the bug Something isn't working label Aug 16, 2024
@kar-rahul-aws
Copy link
Member

Hi @Ryzee119
Thank you for pointing out the issue. We were able to reproduce the issue you mentioned, and raised a patch to fix the same. Could you please give this a try to see if it fixes the issue?

Thanks

@Ryzee119
Copy link
Contributor Author

@kar-rahul-aws thank you for the quick fix. I can confirm that this fixes the issue.

@kar-rahul-aws
Copy link
Member

@Ryzee119 Thank you for reporting back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants