[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# RUN: llvm-mc %s -triple=riscv32 | FileCheck -check-prefixes=ASM %s
|
|
|
|
# RUN: llvm-mc %s -triple=riscv64 | FileCheck -check-prefixes=ASM %s
|
|
|
|
# RUN: llvm-mc %s -triple=riscv32 -mattr=+relax | FileCheck -check-prefix=ASM %s
|
|
|
|
# RUN: llvm-mc %s -triple=riscv64 -mattr=+relax | FileCheck -check-prefix=ASM %s
|
2019-03-13 02:14:16 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefixes=DISASM,DISASM-NORELAX %s
|
2019-03-13 02:14:16 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefixes=DISASM,DISASM-NORELAX %s
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+relax < %s \
|
|
|
|
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefixes=DISASM,DISASM-RELAX %s
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+relax < %s \
|
|
|
|
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefixes=DISASM,DISASM-RELAX %s
|
2019-03-13 02:14:16 +08:00
|
|
|
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# Checks change of options does not cause error: could not find corresponding %pcrel_hi
|
|
|
|
# when assembling pseudoinstruction and its extended form. Also checks that we
|
|
|
|
# evaluate the correct value for local symbols in such a situation.
|
2019-03-13 02:14:16 +08:00
|
|
|
|
|
|
|
.option push
|
|
|
|
.option norelax
|
|
|
|
la a0, a_symbol
|
|
|
|
.option pop
|
|
|
|
la a1, another_symbol
|
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Lpcrel_hi0{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a0, %pcrel_hi(a_symbol)
|
|
|
|
# ASM-NEXT: addi a0, a0, %pcrel_lo(.Lpcrel_hi0)
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Lpcrel_hi1{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a1, %pcrel_hi(another_symbol)
|
|
|
|
# ASM-NEXT: addi a1, a1, %pcrel_lo(.Lpcrel_hi1)
|
2019-03-13 02:14:16 +08:00
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-LABEL: <.Lpcrel_hi0>:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-NEXT: auipc a0, 0
|
|
|
|
# DISASM-NEXT: addi a0, a0, 0
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-LABEL: <.Lpcrel_hi1>:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-NEXT: auipc a1, 0
|
|
|
|
# DISASM-NEXT: addi a1, a1, 0
|
2019-03-13 02:14:16 +08:00
|
|
|
|
|
|
|
.option push
|
|
|
|
.option norelax
|
|
|
|
1:auipc a0, %pcrel_hi(a_symbol)
|
|
|
|
addi a0, a0, %pcrel_lo(1b)
|
|
|
|
.option pop
|
|
|
|
2:auipc a1, %pcrel_hi(another_symbol)
|
|
|
|
addi a1, a1, %pcrel_lo(2b)
|
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Ltmp0{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a0, %pcrel_hi(a_symbol)
|
|
|
|
# ASM-NEXT: addi a0, a0, %pcrel_lo(.Ltmp0)
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Ltmp1{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a1, %pcrel_hi(another_symbol)
|
|
|
|
# ASM-NEXT: addi a1, a1, %pcrel_lo(.Ltmp1)
|
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-LABEL: .Ltmp0{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-NEXT: auipc a0, 0
|
|
|
|
# DISASM-NEXT: addi a0, a0, 0
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-LABEL: .Ltmp1{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-NEXT: auipc a1, 0
|
|
|
|
# DISASM-NEXT: addi a1, a1, 0
|
|
|
|
|
|
|
|
.option push
|
|
|
|
.option norelax
|
|
|
|
la a0, a_symbol
|
|
|
|
.option pop
|
|
|
|
la a1, local_symbol1
|
|
|
|
|
|
|
|
local_symbol1:
|
|
|
|
nop
|
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Lpcrel_hi2{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a0, %pcrel_hi(a_symbol)
|
|
|
|
# ASM-NEXT: addi a0, a0, %pcrel_lo(.Lpcrel_hi2)
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Lpcrel_hi3{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a1, %pcrel_hi(local_symbol1)
|
|
|
|
# ASM-NEXT: addi a1, a1, %pcrel_lo(.Lpcrel_hi3)
|
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-LABEL: .Lpcrel_hi2{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-NEXT: auipc a0, 0
|
|
|
|
# DISASM-NEXT: addi a0, a0, 0
|
|
|
|
# DISASM-NORELAX-NEXT: auipc a1, 0
|
|
|
|
# DISASM-NORELAX-NEXT: addi a1, a1, 8
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-RELAX-LABEL: .Lpcrel_hi3{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-RELAX-NEXT: auipc a1, 0
|
|
|
|
# DISASM-RELAX-NEXT: addi a1, a1, 0
|
|
|
|
|
|
|
|
.option push
|
|
|
|
.option norelax
|
|
|
|
1:auipc a0, %pcrel_hi(a_symbol)
|
|
|
|
addi a0, a0, %pcrel_lo(1b)
|
|
|
|
.option pop
|
|
|
|
2:auipc a1, %pcrel_hi(local_symbol2)
|
|
|
|
addi a1, a1, %pcrel_lo(2b)
|
|
|
|
|
|
|
|
local_symbol2:
|
|
|
|
nop
|
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Ltmp2{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a0, %pcrel_hi(a_symbol)
|
|
|
|
# ASM-NEXT: addi a0, a0, %pcrel_lo(.Ltmp2)
|
2020-03-06 06:18:38 +08:00
|
|
|
# ASM-LABEL: .Ltmp3{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# ASM-NEXT: auipc a1, %pcrel_hi(local_symbol2)
|
|
|
|
# ASM-NEXT: addi a1, a1, %pcrel_lo(.Ltmp3)
|
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-LABEL: .Ltmp2{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-NEXT: auipc a0, 0
|
|
|
|
# DISASM-NEXT: addi a0, a0, 0
|
|
|
|
# DISASM-NORELAX-NEXT: auipc a1, 0
|
|
|
|
# DISASM-NORELAX-NEXT: addi a1, a1, 8
|
2020-03-06 06:18:38 +08:00
|
|
|
# DISASM-RELAX-LABEL: .Ltmp3{{>?}}:
|
[RISCV] Fix evalutePCRelLo for symbols at the end of a fragment
Summary:
This is analogous to D58943, which correctly finds the corresponding
fixup. However, when linker relaxations are disabled and we evaluate the
fixup, we need to also ensure we use an offset of 0 rather than the size
of the previous fragment.
Reviewers: asb, efriedma, lenary
Reviewed By: efriedma
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71978
2020-01-08 12:32:04 +08:00
|
|
|
# DISASM-RELAX-NEXT: auipc a1, 0
|
|
|
|
# DISASM-RELAX-NEXT: addi a1, a1, 0
|