HomePhabricator

[Mips] Error if a non-immediate operand is used while an immediate is expected

Authored by Wang Rui <wangrui@loongson.cn> on Jun 19 2020, 10:05 PM.

Description

[Mips] Error if a non-immediate operand is used while an immediate is expected

The 32-bit type relocation (R_MIPS_32) cannot be used for instructions below:

ori $4, $4, start
ori $4, $4, (start - .)

We should print an error instead.

Reviewed By: atanasyan, MaskRay

Differential Revision: https://reviews.llvm.org/D81908