Skip to content

[AVR] Jumps are off by 2 #102436

Closed
Closed
@Patryk27

Description

@Patryk27

Hi,

Ever since 6859685 (or, more precisely, 84428da), the AVR backend encodes jumps across basic blocks with an extra offset of 2.

That's related to this check:

if (const auto *SymA = Target.getSymA())

... which wasn't triggered for basic blocks before, but it is now (i.e. shouldForceRelocation() returns false for such jumps now).

I'm working on a pure LLVM reproducer, but the original rustc issue has been reported here - if you compare the *.elf from older toolchain and the newer toolchain, you'll see that calls are alright, but jumps have an extra offset.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions