From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24925 invoked by alias); 3 May 2010 05:28:03 -0000 Received: (qmail 24913 invoked by uid 22791); 3 May 2010 05:28:01 -0000 X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_20,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-bw0-f225.google.com (HELO mail-bw0-f225.google.com) (209.85.218.225) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 May 2010 05:27:58 +0000 Received: by bwz25 with SMTP id 25so1130954bwz.8 for ; Sun, 02 May 2010 22:27:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.5.132 with SMTP id 4mr2839757bkv.69.1272864473161; Sun, 02 May 2010 22:27:53 -0700 (PDT) Received: by 10.204.102.74 with HTTP; Sun, 2 May 2010 22:27:53 -0700 (PDT) Date: Mon, 03 May 2010 05:28:00 -0000 Message-ID: Subject: In the NONSTOP implementation why dose gdb use register r0 and r1 as temp registers for rn and rd ? From: xingxing pan To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00000.txt.bz2 hey guys, I'm porting NONSTOP to an ARM similar architechure. I found the following comments in the source. Instruction is of form: rd, [rn,] #imm Rewrite as: Preparation: tmp1, tmp2 <- r0,r1 r0,r1 <- rd,rn Insn: r0,r1 #imm Cleanup: rd <- r0; r0<-tmp1;r1<-tmp2 why dose gdb use register r0 and r1? why not use rd and rn directly? Thank you!