Giter Site home page Giter Site logo

Comments (4)

pacak avatar pacak commented on August 11, 2024 1

Ideally it should detect it and complain. Thank you for the report :)

from cargo-show-asm.

pacak avatar pacak commented on August 11, 2024
elakelaiset% cargo asm --rust -p shadow-shim-helper-rs "shadow_shim_helper_rs::emulated_time::EmulatedTime::saturating_add"
    Finished release [optimized] target(s) in 0.06s
shadow_shim_helper_rs::emulated_time::EmulatedTime::saturating_add:
.Lfunc_begin11:
                // /home/pacak/github/shadow/src/lib/shadow-shim-helper-rs/src/emulated_time.rs : 99
                pub fn saturating_add(&self, duration: SimulationTime) -> EmulatedTime {
        .cfi_startproc
                // /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/num/uint_macros.rs : 1501
                let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT);
        mov rcx, qword ptr [rdi]
        lea rax, [rsi + rcx]
.Ltmp63:
                // /home/pacak/github/shadow/src/lib/shadow-shim-helper-rs/src/emulated_time.rs : 92
                EmulatedTime::from_c_emutime(self.0.checked_add(CSimulationTime::from(duration))?)
        cmp rax, -1
        mov rdx, -2
.Ltmp64:
                // /home/pacak/github/shadow/src/lib/shadow-shim-helper-rs/src/emulated_time.rs : 100
                match self.checked_add(duration) {
        cmove rax, rdx
.Ltmp65:
                // /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/num/uint_macros.rs : 1501
                let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT);
        add rsi, rcx
.Ltmp66:
                // /home/pacak/github/shadow/src/lib/shadow-shim-helper-rs/src/emulated_time.rs : 100
                match self.checked_add(duration) {
        cmovb rax, rdx
                // /home/pacak/github/shadow/src/lib/shadow-shim-helper-rs/src/emulated_time.rs : 104
                }
        ret
.Ltmp67:
.Lfunc_end11:
        .size   shadow_shim_helper_rs::emulated_time::EmulatedTime::saturating_add, .Lfunc_end11-shadow_shim_helper_rs::emulated_time::EmulatedTime::saturating_add
        .cfi_endproc

I guess I need to know a bit more about your setup in order to be able to replicate the problem. Is it still crashing if you drop the target folder? Is it working at all on your machine? Do you have rust sources installed with whatever the rustup invocation is?

from cargo-show-asm.

pacak avatar pacak commented on August 11, 2024

Also is it usual x86_64 Linux with no crosscompilation?

from cargo-show-asm.

stevenengler avatar stevenengler commented on August 11, 2024

Do you have rust sources installed with whatever the rustup invocation is?

This was it. It now works correctly after running rustup component add rust-src. Thanks for your help!

from cargo-show-asm.

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.