Code Monkey home page Code Monkey logo

Comments (8)

maranget avatar maranget commented on August 28, 2024 1

Thanks, the litmus would help me even more.

from herdtools7.

maranget avatar maranget commented on August 28, 2024 1

Ok I found the the test
ISA-DEP-WR-ADDR.

RISCV ISA-DEP-WR-ADDR
(* SC-W to R addr dependency through result register *)
{
0:x5=x; 0:x10=y;
1:x6=y; 1:x9=x;
}
 P0               | P1            ;
 ori x6,x0,1      | ori x5,x0,1   ;
 lr.w x7,0(x5)    | sw x5,0(x6)   ;
 sc.w x8,x6,0(x5) | fence rw,rw   ;
 xor x9,x8,x8     | lw x8,0(x9)  ;
 add x11,x10,x9   |               ;
 lw x5,0(x11)     |               ;
exists
(x=1 /\ 0:x5=0 /\ 1:x8=0)

This test confuses litmus because the register 0:x5 is used both as an address and as a scalar. It can be fixed by renaming the "scalar" x5 into x1 as follows:

RISCV ISA-DEP-WR-ADDR
(* SC-W to R addr dependency through result register *)
{
0:x5=x; 0:x10=y;
1:x6=y; 1:x9=x;
}
 P0               | P1            ;
 ori x6,x0,1      | ori x5,x0,1   ;
 lr.w x7,0(x5)    | sw x5,0(x6)   ;
 sc.w x8,x6,0(x5) | fence rw,rw   ;
 xor x9,x8,x8     | lw x8,0(x9)  ;
 add x11,x10,x9   |               ;
 lw x1,0(x11)     |               ;
exists
(x=1 /\ 0:x1=0 /\ 1:x8=0)

from herdtools7.

maranget avatar maranget commented on August 28, 2024 1

Notice that litmus7 could have issued a warning and even reject the test because the two underlying types (int * and int) have different sizes (64 and 32 bits).

from herdtools7.

maranget avatar maranget commented on August 28, 2024

Hi @Sevwood, thanks for your report.

Would you share the ISA-DEP-WR-ADDR test with us? This would help a lot.

from herdtools7.

Sevwood avatar Sevwood commented on August 28, 2024

Hi @Sevwood, thanks for your report.

Would you share the ISA-DEP-WR-ADDR test with us? This would help a lot.

Hi @maranget

Sure, the attached zip contains two ISA-DEP-WR-ADDR.c generated by litmus 7.56.3 and litmus 7.56.

ISA-DEP-WR-ADDR.zip

Thank you,
Sev.

from herdtools7.

Sevwood avatar Sevwood commented on August 28, 2024

Thanks, the litmus would help me even more.

Hi @maranget

Do you mean you need my litmus7 built by herdtools7?

Thank you,
Sev.

from herdtools7.

maranget avatar maranget commented on August 28, 2024

Looking at the C files, litmus 7.56.3 found that register x5 of thread P0 holds an address, while litmus 7.56 did not.

Indeed this register holds an address as P0 code includes one store and one load instruction whose effective address is 0(x5). Having the litmus test at hand would help me understand where is 0:x5 coming from. Moreover, if the test has been produced by one of herdtools generators, it may be that the generator is buggy, So having the whole story would help to understand where the problem is.

from herdtools7.

Sevwood avatar Sevwood commented on August 28, 2024

Thank you so much, I will try this solution later.

from herdtools7.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.