From mboxrd@z Thu Jan 1 00:00:00 1970 From: YanMin Qiao Date: Sat, 04 Jan 2003 21:28:15 +0800 Subject: [U-Boot-Users] relocate_code References: <21605.1041684608@msa.cmst.csiro.au> Message-ID: <3E16E16F.6020601@sohu.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Thank you for your detail answer :) , I see them now. Best regards Murray Jensen wrote: >On Sat, 04 Jan 2003 10:45:27 +0800, YanMin Qiao writes: > > >> First thanks for your answer, howerever, my question is >> Why we copy _forward_ when _memory address_ >when _memory address_>=CFG_MONITOR_BASE we will have to _copy backword_? >>Is it because some overlapping problem when copy? >> >> > >Yes. It is generic memory copying code - if it is at all possible that the >copy might overwrite the destination then it goes backwards, instead of >forwards. It shouldn't make a lot of difference either way (I guess I can >imagine a scenario where it stuffs up some fancy pre-fetching in the CPU, >which might make it go half or a third of the speed, but its not likely). > > > >>>Be careful with the first "bge" above - it isn't testing the result of the >>>previous instruction, it is testing the result of the "cmplw" done quite a >>>few instructions beforehand and stored in "cr1" i.e. it will branch if "r3" >>>(the destination address) is >= "r4" (the source address) i.e. if it is >>>possible that the copy will overwrite the source. >>> >>> >>> >> thanks, I know >> >> > >OK, I was just trying to be thorough. Cheers! > Murray... >-- >Murray Jensen, CSIRO Manufacturing & Infra. Tech. Phone: +61 3 9662 7763 >Locked Bag No. 9, Preston, Vic, 3072, Australia. Fax: +61 3 9662 7853 >Internet: Murray.Jensen at csiro.au > >Hymod project: http://www.msa.cmst.csiro.au/projects/Hymod/ > >To the extent permitted by law, CSIRO does not represent, warrant and/or >guarantee that the integrity of this communication has been maintained or >that the communication is free of errors, virus, interception or interference. > >The information contained in this e-mail may be confidential or privileged. >Any unauthorised use or disclosure is prohibited. If you have received this >e-mail in error, please delete it immediately and notify Murray Jensen on >+61 3 9662 7763. Thank you. > > > >