I
On Jun 20, 2007, at 7:52 PM, Jiayuan Meng wrote:

Hi Steve,


Also, what happens if you run with AtomicSimpleCPU, and with or without
a single level of caches?
I manually used the mutex_lock in glibc's sysdeps/mach/alpha/ machine-lock.h, the LL/SC worked fine with both configurations. (L1 & L2 / L1 only)

I am still trying to figure out how to configure the right build environment. I tried crosstool gcc-4.1.1-glibc-2.3.5-nptl.dat and gcc-3.4.5-glibc-2.3.5-tls.dat, but malloc just simply craches. I'm diving into crosstool now. Maybe there are some configurations I need to tune to rebuild glibc and make malloc include the right header. I'm not sure whether crosstool really support nptl (at lease on their website, version 0.42 doesn't).

I've never tried to compile an nptl version so I can't be any help.


FYI, I think there is a bug in glibc-2.3.5 sysdeps/mach/alpha/ machine-lock.h
1: void
2: __spin_unlock (__spin_lock_t *__lock)
3: {
4:   __asm__ __volatile__ ("mb; stq $31, %0; mb"
5:  : "=m" (__lock));
6: }

according to the M5 trace, the lock isn't freed unless line 5 is changed to:
: "=m" (*__lock));
Do you happen to have a trace of the m5 traces that fail and don't? Maybe the disassembled function from the binary that fails and the one that doesn't? It might be a compiler/assembler problem, but it might also be that we are handling the mb incorrectly. Did this happen on a simple-cpu (if so it's definitely the compiler/assembler).

Ali _______________________________________________
m5-users mailing list
m5-users@m5sim.org
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to