Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[herd] Write a label to LR (X30) when it is possible #776

Merged
merged 2 commits into from
Apr 9, 2024

Commits on Apr 8, 2024

  1. [herd] Write a label to LR (X30) when it is possible

    In sequences where the label is know, rather than setting the LR with
    an internal address we use the label. This means that in certain cases
    (-variant=ifetch) we can use it to address the instruction in that
    label.
    
    Signed-off-by: Nikos Nikoleris <[email protected]>
    relokin committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    a2dceb6 View commit details
    Browse the repository at this point in the history
  2. [herd] Set ELR_EL1 automatically when it is possible

    This change enables herd to handle tests like:
    
    AArch64 LDRv0+I2V-dsb.ishst
    {
     [PTE(x)]=(oa:PA(x),valid:0);
     x=1;
    
     0:X1=x;
     0:X3=PTE(x);
     0:X2=(oa:PA(x),valid:1);
    }
     P0            | P0.F           ;
    L0:            | STR X2,[X3]    ;
     LDR W0,[X1]   | DSB ISHST      ;
                   | ERET           ;
    locations[0:ELR_EL1;]
    forall(0:X0=1)
    
    Note that in the above test ELR_EL1 is automatically set to
    P0:L0. However this wouldn't be the case if the faulting instruction
    didn't have a label. In which case herd7 would warn that the target of
    ERET is unknown.
    
    Signed-off-by: Nikos Nikoleris <[email protected]>
    relokin committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    e41311f View commit details
    Browse the repository at this point in the history