Project

General

Profile

Actions

Bug #5717

closed

Usage of regs as operation parameters

Added by Mikhail Chupilko over 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Andrei Tatarnikov
Category:
ISA Simulator
Target version:
-
Start date:
03/18/2015
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Detected in build:
2.1.5-beta-150305
Platform:
Published in build:
150324

Description

Usage of

REG(31)
in the following code fragment will result in "incompatible type" error but should not do it.
op subs (rd: REG, rn: REG, imm12: card(12), shift: card(2))
...
op cmp (rn: REG, imm12: card(12))
/** Compare (extended immediate): alias for SUBS XZR,Xn|SP,#aimm.
    CMP Xn|SP, #aimm */
  syntax = format("cmp %s, %d", rn.syntax, imm12)
  image = format("%d111000100%12s%5s11111", 1, imm12, rn.image)
  action = {
    shift_flag = coerce(card(2), 0);
    subs(REG(31), rn, imm12, shift_flag).action;
  }

Result:
    [javac] C:\work\microtesk-2.1.5-beta-150305\gen\src\java\ru\ispras\microtesk\model\armv8\op\cmp.java:85: error: incompatible types: Data cannot be converted to Location
    [javac]         new subs(new REG(DataEngine.valueOf(Type.INT(8), 31)), rn, imm12, shift_flag.access()).action();
    [javac]                                            ^


Subtasks 1 (0 open1 closed)

Task #5721: Usage of register indexes in operation action block callClosedAndrei Tatarnikov03/18/2015

Actions
Actions

Also available in: Atom PDF