Le 2015-08-05 10:30, Attila Kinali a écrit :
Moin,
Hallo,

I just tried the VHPI example from Yann Guidon [1] and get
a different behaviour when using ghdl with llvm than with gcc:

gcc:
---
# sh access.sh
access_test.vhdl:31:5:@0ms:(report note): integer=0
access_test.vhdl:33:5:@0ms:(report note): integer=42
access_test.vhdl:35:5:@0ms:(report note): integer=24
---

llvm:
---
# sh access.sh
access_test.vhdl:31:5:@0ms:(report note): integer=0
access_test.vhdl:33:5:@0ms:(report note): integer=42
access_test.vhdl:35:5:@0ms:(report note): integer=-1936036088
---

Also, the last output isnt stable with llvm, ie it changes
with each run.

So it's obvious that LLVM does things very differently...
It's probably over-optimising ?

I had designed this code by reverse-engineering a GCC-based
version (might be 0.29) several years ago.
It was quite application-specific and LLVM was not on the radar yet...

The gcc version is ghdl 0.31 with gcc 4.8.2, the llvm version is
straight from hg (837) with llvm 3.5 (debian/testing)

"at least" it still works with the GCC version :-D
Good to know for my next experiments.

                        Attila
[1] http://ygdes.com/GHDL/access_c/

Thanks for the useful feedback
YG

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to