Giter VIP home page Giter VIP logo

Comments (4)

bharadwajy avatar bharadwajy commented on July 28, 2024 1

Fixed the syntax error in test provided and added to tool tests. Passes.

from llvm-mctoll.

bharadwajy avatar bharadwajy commented on July 28, 2024

Thanks for using the tool and for the bug report.

Can you add the gcc version, as well as the Linux distro used (may be the later is not entirely relevant, but please do so, if you can) to the details of this issue?

Using gcc 7.4.0 on Ubunbtu 18.04.04, following is the code generated for foo():

0000000000000610 <foo>:
 610:	48 89 f8             	mov    rax,rdi
 613:	eb 06                	jmp    61b <foo+0xb>
 615:	0f 1f 00             	nop    DWORD PTR [rax]
 618:	48 89 d0             	mov    rax,rdx
 61b:	48 8b 10             	mov    rdx,QWORD PTR [rax]
 61e:	48 85 d2             	test   rdx,rdx
 621:	75 f5                	jne    618 <foo+0x8>
 623:	f3 c3                	repz ret 
 625:	66 2e 0f 1f 84 00 00 	nop    WORD PTR cs:[rax+rax*1+0x0]
 62c:	00 00 00 
 62f:	90                   	nop

Unfortunately, the code generated with gcc 7.4.0 does not demonstrate the code pattern that triggers the malformed tool output reported in this issue. So, it would be very beneficial to get the gcc version that generates the code pattern triggering the failure, thus allowing for support to be added to correctly handle such a code pattern.

While the solution you propose seems reasonable, I would also like to look at the possibility of addressing it during BasicBlock creation.

Thanks!

from llvm-mctoll.

tathanhdinh avatar tathanhdinh commented on July 28, 2024

Hello,
Thanks you for the response. My machine is Fedora 31

gcc --version
gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)

from llvm-mctoll.

bharadwajy avatar bharadwajy commented on July 28, 2024

Thanks! Since I do not have immediate access to that version of gcc, can you please provide the assembly listing of foo.c generated on your machine using the above gcc version (gcc -O3 -S foo.c should generate foo.s)? This would help with creation of a test case as well as allow for implementing a fix.

Any help is highly appreciated.

from llvm-mctoll.

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.