It worked! Thank you for responding.
Now I can compile my project successfully. From: gem5-users <[email protected]> On Behalf Of Gabe Black Sent: 2020년 3월 16일 Monday 6:02 PM To: gem5 users mailing list <[email protected]> Subject: Re: [gem5-users] I have Linking Error on sim/guest_abi.hh The mechanism that gathers arguments for pseudo instructions only knows how to get uint64_ts on x86. You need to use those, or go into arch/x86/pseudo_inst_abi.hh and teach it how to gather other types like uint32_t. Addr will likely just work because it should be equivalent to uint64_t. Gabe On Mon, Mar 16, 2020 at 1:49 AM Baek Dae Hyeon <[email protected]<mailto:[email protected]>> wrote: build/X86/cpu/o3/probe/lib.do.partial: In function `std::enable_if<!std::is_void<bool>::value, bool>::type GuestABI::callFrom<X86PseudoInstABI, bool, unsigned int, unsigned int, unsigned long>(ThreadContext*, X86PseudoInstABI::Position&, std::function<bool (ThreadContext*, unsigned int, unsigned int, unsigned long)>)': /mnt/d/SparsePIM/build/X86/sim/guest_abi.hh:357: undefined reference to `GuestABI::Argument<X86PseudoInstABI, unsigned int, void>::get(ThreadContext*, int&)' build/X86/cpu/o3/probe/lib.do.partial: In function `std::enable_if<!std::is_void<bool>::value, bool>::type GuestABI::callFrom<X86PseudoInstABI, bool, unsigned int, unsigned long, unsigned long>(ThreadContext*, X86PseudoInstABI::Position&, std::function<bool (ThreadContext*, unsigned int, unsigned long, unsigned long)>)': /mnt/d/SparsePIM/build/X86/sim/guest_abi.hh:357: undefined reference to `GuestABI::Argument<X86PseudoInstABI, unsigned int, void>::get(ThreadContext*, int&)' build/X86/cpu/o3/probe/lib.do.partial: In function `std::enable_if<!std::is_void<bool>::value, bool>::type GuestABI::callFrom<X86PseudoInstABI, bool, unsigned int, unsigned long>(ThreadContext*, X86PseudoInstABI::Position&, std::function<bool (ThreadContext*, unsigned int, unsigned long)>)': /mnt/d/SparsePIM/build/X86/sim/guest_abi.hh:357: undefined reference to `GuestABI::Argument<X86PseudoInstABI, unsigned int, void>::get(ThreadContext*, int&)' build/X86/cpu/o3/probe/lib.do.partial: In function `std::enable_if<!std::is_void<bool>::value, bool>::type GuestABI::callFrom<X86PseudoInstABI, bool, unsigned int>(ThreadContext*, X86PseudoInstABI::Position&, std::function<bool (ThreadContext*, unsigned int)>)': /mnt/d/SparsePIM/build/X86/sim/guest_abi.hh:357: undefined reference to `GuestABI::Argument<X86PseudoInstABI, unsigned int, void>::get(ThreadContext*, int&)' build/X86/cpu/simple/lib.do.partial: In function `std::enable_if<!std::is_void<bool>::value, bool>::type GuestABI::callFrom<X86PseudoInstABI, bool, unsigned int, unsigned int, unsigned long>(ThreadContext*, X86PseudoInstABI::Position&, std::function<bool (ThreadContext*, unsigned int, unsigned int, unsigned long)>)': /mnt/d/SparsePIM/build/X86/sim/guest_abi.hh:357: undefined reference to `GuestABI::Argument<X86PseudoInstABI, unsigned int, void>::get(ThreadContext*, int&)' build/X86/cpu/simple/lib.do.partial:/mnt/d/SparsePIM/build/X86/sim/guest_abi.hh:357: more undefined references to `GuestABI::Argument<X86PseudoInstABI, unsigned int, void>::get(ThreadContext*, int&)' follow I’ve implemented several customized pseudo-instructions on include/gem5/m5ops.h as follows: bool PIMMultiplySize(sparse_mtx *A, sparse_mtx *B, sparse_mtx *C); bool PIMAddSize(sparse_mtx *A, sparse_mtx *C); bool PIMMergeSize(sparse_mtx *A, sparse_mtx *C, uint32_t num); bool PIMMultiply(sparse_mtx *A, sparse_mtx *B, sparse_mtx *C); bool PIMAdd(sparse_mtx *A, sparse_mtx *C); bool PIMMerge(sparse_mtx *A, sparse_mtx *C, uint32_t num); bool PIMGetSize(const char *file_path, uint32_t len, uint32_t *nrow, uint32_t *ncol); bool PIMGetMatrix(uint32_t rpos, uint32_t cpos, void *mtx); bool PIMGetMatrixSize(uint32_t rpos, uint32_t cpos, void *mtx); And the simulator implementation is on arch/x86/pseudo_inst.hh as follows: bool PIMMultiplySize(ThreadContext *tc, Addr A, Addr B, Addr C); bool PIMAddSize(ThreadContext *tc, Addr A, Addr C); bool PIMMergeSize(ThreadContext *tc, Addr Int, Addr C, uint32_t num); bool PIMMultiply(ThreadContext *tc, Addr A, Addr B, Addr C); bool PIMAdd(ThreadContext *tc, Addr A, Addr C); bool PIMMerge(ThreadContext *tc, Addr Int, Addr C, uint32_t num); bool PIMGetSize(ThreadContext *tc, Addr file_path, uint32_t len, Addr nrow, Addr ncol); bool PIMGetMatrix(ThreadContext *tc, uint32_t rpos, uint32_t cpos, Addr mtx); bool PIMGetMatrixSize(ThreadContext *tc, uint32_t rpos, uint32_t cpos, Addr mtx); I’d like to know why this linking error happens. I didn’t change anything on sim/guest_abi.hh, arch/x86/guest_abi.hh _______________________________________________ gem5-users mailing list [email protected]<mailto:[email protected]> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
