[PTLsim-devel] Compilation Error of PTLsim on 32-bit Linux System
Pan Yan
panyan at gmail.com
Tue Oct 16 15:11:19 EDT 2007
Hi PTLsim developers,
I just started with PTLsim and had some problem with compiling the
simulator. Below are my system environment:
Linux 2.6.9-55.0.9.ELsmp #1 SMP Tue Sep 25 02:17:24 EDT 2007 i686 athlon
i386 GNU/Linux
svn 1.4.5
gcc 4.1.0
ptlsim-20070921-r225.tar.bz2<http://ptlsim.org/ptlsim-20070921-r225.tar.bz2>
The problem is: there is syntax error when compiling to seqcore.cpp
the error message is as below:
------------------------------------------------------------------------------------------------------------------
g++ -O99 -g -fomit-frame-pointer -march=pentium4 -falign-functions=16
-fno-trapping-math -fno-stack-protector -fno-exceptions -fno-rtti
-funroll-loops -mpreferred-stack-boundary=4 -fno-strict-aliasing
-Wreturn-type -D__PTLSIM_OOO_ONLY__ -I. -DBUILDHOST="`hostname -f`"
-DSVNREV="`LANG=C; svn info | grep "Last Changed Rev" | cut -d " " -f4`"
-DSVNDATE="`LANG=C; svn info | grep "Last Changed Date" | cut -d " " -f4`"
-c seqcore.cpp
./kernel.h: In member function 'Waddr Context::check_and_translate(Waddr,
int, bool, bool, int&, PageFaultErrorCode&, PTEUpdate&, Level1PTE&)':
./kernel.h:363: warning: converting to non-pointer type 'Waddr' from NULL
seqcore.cpp: In member function 'int SequentialCore::issuestore(const
TransOp&, SFR&, Waddr&, W64, W64, W64, PTEUpdate&)':
seqcore.cpp:775: error: no matching function for call to 'inrange(Waddr&,
W64&, W64&)'
seqcore.cpp: In member function 'int SequentialCore::issueload(const
TransOp&, SFR&, Waddr&, W64, W64, W64, PTEUpdate&)':
seqcore.cpp:897: error: no matching function for call to 'inrange(Waddr&,
W64&, W64&)'
make: *** [seqcore.o] Error 1
------------------------------------------------------------------------------------------------------------------
I checked line 775 of seqcore.cpp, it is as below:
if unlikely (inrange(addr, config.log_trigger_virt_addr_start,
config.log_trigger_virt_addr_end)) { ......
And addr here is defined as Waddr some lines above, while the member
variable config.log_trigger_virt_addr_start is defined as W64 in line 165 of
file ptlsim.h.
In globals.h line 29 - 33, Waddr is defined as either W32 or W64 depending
on system. Thus i'll get W32 for Waddr. And that violates the template
definition of template function inrange as the parameters are of different
types.
(inrange is defined in line 159 of globals.h
template <typename T> static inline bool inrange(const T& v, const T& minv,
const T& maxv) { typeof (v) _v = v; return ((_v >= minv) & (_v <= maxv)); }
)
Could anyone help me explain this? And what should I do to get it correctly
compiled?
Thanks you very much!
Best regards,
Pan Yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ptlsim.org/pipermail/ptlsim-devel/attachments/20071016/f0ee402f/attachment.htm
More information about the PTLsim-devel
mailing list