Skip to content

[RISCV] Match the behavior for Hardware Loop

Eclipse Webmaster requested to merge github/fork/realqhc/cv-hwlp-fix into development

Created by: realqhc

Fix #40 (closed), by performing bit shift before decoding the immediate and encoding it. It should be noted that there is still a slight difference shown below.

as_warn (_("constant for cv.setupi must be a multiple of 4: "
				     "%ld truncated to %ld"),
				   imm_expr->X_add_number,
				   imm_expr->X_add_number-(imm_expr->X_add_number % 4));

In GCC the value will be truncated and a warning is displayed. However the current implementation does not allow non-multiple of 4 as input. This behavior is inherited from the original Hwlp implementation.

Merge request reports

Loading