From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31339 invoked by alias); 25 Jan 2013 22:10:36 -0000 Received: (qmail 31321 invoked by uid 22791); 25 Jan 2013 22:10:35 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RP_MATCHES_RCVD,TW_EQ X-Spam-Check-By: sourceware.org Received: from dns1.mips.com (HELO dns1.mips.com) (12.201.5.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Jan 2013 22:09:57 +0000 Received: from mailgate1.mips.com (mailgate1.mips.com [12.201.5.111]) by dns1.mips.com (8.13.8/8.13.8) with ESMTP id r0PM9f5f005227; Fri, 25 Jan 2013 14:09:42 -0800 X-M-MSG: Received: from exchdb01.mips.com (unknown [192.168.36.84]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mailgate1.mips.com (Postfix) with ESMTP id 2C883364630; Fri, 25 Jan 2013 14:09:35 -0800 (PST) Received: from [192.168.65.53] (192.168.65.53) by exchhub01.mips.com (192.168.36.84) with Microsoft SMTP Server id 14.2.247.3; Fri, 25 Jan 2013 14:09:32 -0800 Subject: RE: [PATCH 2/2] MIPS16: MIPS16 support proper From: Steve Ellcey To: "Maciej W. Rozycki" CC: "libc-alpha@sourceware.org" , "libc-ports@sourceware.org" , Chung-Lin Tang In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" Date: Fri, 25 Jan 2013 22:10:00 -0000 Message-ID: <1359151771.11963.200.camel@ubuntu-sellcey> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-EMS-Proccessed: 6LP3oGfGVdcdb8o1aBnt6w== X-EMS-STAMP: tZ8h5e0wxjJrIOvK0sMViA== Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00060.txt.bz2 On Fri, 2013-01-25 at 05:13 +0000, Maciej W. Rozycki wrote: > Have you tried running your code on actual hardware? This is how we did > testing of all these changes. I thought I had a simple program working on my 74K, but I just tried a test case (hello world compiled statically) and it gave me a bus error. > Please also note that as I mentioned along the patch submission mixing > execution modes in static constructors or destructors installed as single > lumps of code (that is with the use of the DT_INIT or DT_FINI dynamic > tags) cannot be supported. Can you run `objdump -j .init -j .fini -d' on > your binary and make sure the disassembly looks right? Mine looks a bit different, this is the .init and .fini from a dynamically linked big endian hello world program, I am not sure where the addiu instructions are coming from. x: file format elf32-tradbigmips Disassembly of section .init: 004004d0 <_init>: 4004d0: f000 6a02 li v0,2 4004d4: f2f0 0b0c la v1,3f87c0 <_DYNAMIC-0x7a08> 4004d8: f400 3240 sll v0,16 4004dc: e269 addu v0,v1 4004de: 64c4 save 32,ra 4004e0: 659a move gp,v0 4004e2: d204 sw v0,16(sp) 4004e4: f030 9a64 lw v1,-32732(v0) 4004e8: 2304 beqz v1,4004f2 <_init+0x22> 4004ea: f030 9a44 lw v0,-32732(v0) 4004ee: ea40 jalr v0 4004f0: 653a move t9,v0 4004f2: 6500 nop 4004f4: 0411 addiu a0,sp,68 4004f6: 0001 addiu s0,sp,4 4004f8: 0000 addiu s0,sp,0 4004fa: 0000 addiu s0,sp,0 4004fc: 7410 cmpi a0,16 4004fe: 0196 addiu s1,sp,600 400500: 0000 addiu s0,sp,0 400502: 0000 addiu s0,sp,0 400504: 0411 addiu a0,sp,68 400506: 0001 addiu s0,sp,4 400508: 0000 addiu s0,sp,0 40050a: 0000 addiu s0,sp,0 40050c: 7410 cmpi a0,16 40050e: 01c0 addiu s1,sp,768 400510: 0000 addiu s0,sp,0 400512: 0000 addiu s0,sp,0 400514: 6444 restore 32,ra 400516: e8a0 jrc ra Disassembly of section .fini: 00400730 <_fini>: 400730: f000 6a02 li v0,2 400734: f090 0b0c la v1,3f87c0 <_DYNAMIC-0x7a08> 400738: f400 3240 sll v0,16 40073c: e269 addu v0,v1 40073e: 64c4 save 32,ra 400740: 659a move gp,v0 400742: d204 sw v0,16(sp) 400744: 0411 addiu a0,sp,68 400746: 0001 addiu s0,sp,4 400748: 0000 addiu s0,sp,0 40074a: 0000 addiu s0,sp,0 40074c: 7410 cmpi a0,16 40074e: 0182 addiu s1,sp,520 400750: 0000 addiu s0,sp,0 400752: 0000 addiu s0,sp,0 400754: 6444 restore 32,ra 400756: e8a0 jrc ra Steve Ellcey sellcey@mips.com