From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,2fe965218100c2bd X-Google-Attributes: gidf678f,public X-Google-Thread: 102b75,2fe965218100c2bd X-Google-Attributes: gid102b75,public X-Google-ArrivalTime: 1994-03-08 04:54:41 PST Xref: gmd.de comp.arch:19842 comp.unix.osf.misc:1046 Path: gmd.de!xlink.net!howland.reston.ans.net!sol.ctr.columbia.edu!caen!crl.dec.com!crl.dec.com!nntpd.lkg.dec.com!sousa.ako.dec.com!sousa.ako.dec.com!murari From: murari@sousa.ako.dec.com (Srinivasan Murari) Newsgroups: comp.arch,comp.unix.osf.misc Subject: Re: Strange behaviour of Alpha Floating Point Load/Stores wrt cache misses Date: 7 Mar 1994 14:08:15 GMT Organization: Digital Equipment Corporation Distribution: world Message-ID: <2lfcgf$mnb@sousa.ako.dec.com> References: Reply-To: murari@sousa.ako.dec.com (Srinivasan Murari) NNTP-Posting-Host: sousa.ako.dec.com X-Newsreader: mxrn 6.18-5 In article , tlb@chardonnay.harvard.edu (Trevor Blackwell) writes: |> |>> I am pretty sure I am controlling for all extraneous factors. My |>> measurement code runs 100 times, only referencing an array where it |>> sticks the running time. All the code fits in the I-cache. I'm not |>> getting interrupts (the whole measurement takes about 10 uS, and |>the |>> effect of interrupts is real obvious when they do occur.) The |>whole |>> shebang (code & data) fits in the off-chip B-cache, and my flush |>> vector should not flush the register load/store areas out of there. |> |>Well, I controlled them all except one. In order that I could call |>the context switch code from a C program, I replaced the loads and |>stores to all the miscellaneous registers, with loads and stores to |>$31 (the one which reads as zero). It turns out that the instruction |> |> LDQ $31,address |> |>is a NOP - it never actually references any memory. I am quite |>surprised that it actually does this - I'm sure on a MIPS or most |>other RISCs it would do the load anyway, and just let the bits fall |>off the end of the wire in the register file. So that explains |>everything. It even sort of suggests that this might happen in the |>manual. |> |>In fact, it appears that the way Dirk Grunwald originally wrote the |>AweSime context switcher is the fastest way possible - loads and |>stores interleaved. |> |>-- |>-- |>Trevor Blackwell tlb@das.harvard.edu (617) 495-8912 |>(info and words of wit in my .plan) |>Disavowal: My opinions. |> As trevor correctly observed the LDQ $31, address is thrown away >From page 3-1 of the Alpha Architecture reference manual For all cases except Unconditional branch and Jump instructions, results of an instruction that specifies R31 as the destination operand are discarded. Also it is UNPREDICTABLE whether the other destination operands (implicit and explicit) are changed by the instruction. It is implementation dependent to what extent the instruction is actually executed once it has been fetched. It is also UNPREDICTABLE whether exceptions are signalled during the execution of such an instruction. I believe the DECChip 20164 discards the R31 target LDQ at the issue stage. This would explain the anamolies you have been seeing. Try loading your data into some register other than R31 to see more consistent behavior. /murari