Skip to content

wrong define of 128-bit related functions like __multi3 and __floatuntidf on csky #551

Closed
rust-lang/rust
#117154
@Dirreke

Description

@Dirreke

I have added csky-unknown-linux-gnuabiv2 and csky-unknown-linux-gnuabiv2hf last days in rust-lang/rust#113658 . And I got SIGSEGV when I run a executable file on csky.

I checked the file and found that in LLVM-IR file of compiler-buildins, (Taking __floatuntidf as an example),it defines __floatuntidf as

define hidden noundef double @__floatuntidf(ptr noalias nocapture noundef readonly align 4 dereferenceable(16) %i) unnamed addr 

which has a ptr parameter but not values.

In executable files, the value of parameters are passed to the __floatuntidf. and then it regard the value as an address to load data, which causes the SIGSEGV


It's confused me that what caused the parameters become ptr.
Is this function compiled from float/conv.rs or anywhere else?
And how can I fixed it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions