Skip to content

Port IA32_flat assembly code no longer compiles correctly. #1121

Closed
@Ryzee119

Description

@Ryzee119

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions