From owner-freebsd-alpha Fri May 10 14: 7:36 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 27B4137B406; Fri, 10 May 2002 14:07:04 -0700 (PDT) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id RAA22463; Fri, 10 May 2002 17:07:04 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g4AL6YF80473; Fri, 10 May 2002 17:06:34 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15580.13914.162169.930227@grasshopper.cs.duke.edu> Date: Fri, 10 May 2002 17:06:34 -0400 (EDT) To: Jeff Roberson Cc: , Subject: Re: gcc3 & alpha kernels In-Reply-To: <20020510164149.M49378-100000@mail.chesapeake.net> References: <15580.11242.459728.984239@grasshopper.cs.duke.edu> <20020510164149.M49378-100000@mail.chesapeake.net> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Jeff Roberson writes: > On Fri, 10 May 2002, Andrew Gallatin wrote: > > > > > Alan Cox writes: > > > > > > > > Did Jeff see a lockup at boot? Or was this on a running system? > > > > > > I believe it was at boot time. I can't swear to that, however. > > > > > > > Thanks.. that's the same as me. It would seem that the new compiler > > is botching the atomic inlines then. > > > > Hmm.. According to the disassembly, it looks like the correct > > sequences are there, though.. > > > > Drew > > > > It was at boot time. I believe that this was the first time we ever did > negative atomic ints on alpha. This was with the old compiler as well. I > haven't looked at the gcc3 output. > > When I looked at the assembly it was pretty clear that the inline wasn't > written to support non sign extended values. If you change the prototype > the signed int everything works as expected though. FWIW, this (atomic) is the problem. I can boot a kernel where everything but vm_object.o is built with gcc 3.1 and vm_object.o is built by the -stable gcc 2.95 compiler. I'm not sure where I can go from here. David, is this enough information for you to use? I haven't used this kernel that I just built, as I'm not sure that I should trust it :-( Drew PS: I've appended disassembled _vm_object_allocate()'s produced by both GCC's. -------- GCC 3.1-------------------------------------- 0000000000000068 <_vm_object_allocate>: 68: 00 00 bb 27 ldah gp,0(t12) 6c: 00 00 bd 23 lda gp,0(gp) 70: e0 ff de 23 lda sp,-32(sp) 74: 00 00 5e b7 stq ra,0(sp) 78: 08 00 3e b5 stq s0,8(sp) 7c: 10 00 5e b5 stq s1,16(sp) 80: 0a 04 f1 47 mov a1,s1 84: 09 04 f2 47 mov a2,s0 88: 30 00 f2 b7 stq zero,48(a2) 8c: 30 00 32 20 lda t0,48(a2) 90: 38 00 32 b4 stq t0,56(a2) 94: 10 00 f2 b7 stq zero,16(a2) 98: 10 00 32 20 lda t0,16(a2) 9c: 18 00 32 b4 stq t0,24(a2) a0: 5c 00 12 3a stb a0,92(a2) a4: 48 00 29 b6 stq a1,72(s0) a8: 01 00 3f 20 lda t0,1 ac: 50 00 32 b0 stl t0,80(a2) b0: 5e 00 f2 37 stw zero,94(a2) b4: 01 f0 1f 46 and a0,0xff,t0 b8: a1 37 20 40 cmpule t0,0x1,t0 bc: 06 00 20 e4 beq t0,d8 <_vm_object_allocate+0x70> c0: 10 04 f2 47 mov a2,a0 c4: 00 20 3f 22 lda a1,8192 c8: 00 00 7d a7 ldq t12,0(gp) cc: 00 40 5b 6b jsr ra,(t12),d0 <_vm_object_allocate+0x68> d0: 00 00 ba 27 ldah gp,0(ra) d4: 00 00 bd 23 lda gp,0(gp) d8: a1 77 42 41 cmpule s1,0x13,t0 dc: 02 00 5f 41 addl s1,zero,t1 e0: 13 00 3f 22 lda a1,19 e4: d1 04 22 44 cmovne t0,t1,a1 e8: 00 00 7d a4 ldq t2,0(gp) ec: 00 00 23 30 ldwu t0,0(t2) f0: 60 00 29 34 stw t0,96(s0) f4: 22 76 20 48 zapnot t0,0x3,t1 f8: 21 76 20 48 zapnot t0,0x3,t0 fc: 01 04 21 42 addq a1,t0,t0 100: 01 f0 23 44 and t0,0x1f,t0 104: 00 00 83 a8 ldl_l t3,0(t2) 108: 24 f6 81 48 zapnot t3,0xf,t3 10c: a4 05 82 40 cmpeq t3,t1,t3 110: 04 00 80 e4 beq t3,124 <_vm_object_allocate+0xbc> 114: 04 04 e1 47 mov t0,t3 118: 00 00 83 b8 stl_c t3,0(t2) 11c: 00 00 80 e4 beq t3,120 <_vm_object_allocate+0xb8> 120: 00 40 00 60 mb 124: 21 f6 81 48 zapnot t3,0xf,t0 128: f0 ff 3f e4 beq t0,ec <_vm_object_allocate+0x84> 12c: 88 00 e9 b7 stq zero,136(s0) 130: 68 00 e9 b7 stq zero,104(s0) 134: 70 00 e9 b7 stq zero,112(s0) 138: 00 00 7d a4 ldq t2,0(gp) 13c: 00 00 43 a0 ldl t1,0(t2) 140: 7f ff 22 20 lda t0,-129(t1) 144: 58 00 29 b0 stl t0,88(s0) 148: 01 00 3f 40 addl t0,zero,t0 14c: 00 00 83 a8 ldl_l t3,0(t2) 150: 24 f6 81 48 zapnot t3,0xf,t3 154: a4 05 82 40 cmpeq t3,t1,t3 158: 04 00 80 e4 beq t3,16c <_vm_object_allocate+0x104> 15c: 04 04 e1 47 mov t0,t3 160: 00 00 83 b8 stl_c t3,0(t2) 164: 00 00 80 e4 beq t3,168 <_vm_object_allocate+0x100> 168: 00 40 00 60 mb 16c: 21 f6 81 48 zapnot t3,0xf,t0 170: f2 ff 3f e4 beq t0,13c <_vm_object_allocate+0xd4> 174: 40 00 29 a0 ldl t0,64(s0) 178: 01 00 21 20 lda t0,1(t0) 17c: 40 00 29 b0 stl t0,64(s0) 180: 00 00 1d a6 ldq a0,0(gp) 184: 11 04 ff 47 clr a1 188: 00 00 5d a6 ldq a2,0(gp) 18c: e4 00 7f 22 lda a3,228 190: 00 00 7d a7 ldq t12,0(gp) 194: 00 40 5b 6b jsr ra,(t12),198 <_vm_object_allocate+0x130> 198: 00 00 ba 27 ldah gp,0(ra) 19c: 00 00 bd 23 lda gp,0(gp) 1a0: 00 00 e9 b7 stq zero,0(s0) 1a4: 00 00 5d a4 ldq t1,0(gp) 1a8: 08 00 22 a4 ldq t0,8(t1) 1ac: 08 00 29 b4 stq t0,8(s0) 1b0: 08 00 22 a4 ldq t0,8(t1) 1b4: 00 00 21 b5 stq s0,0(t0) 1b8: 08 00 22 b5 stq s0,8(t1) 1bc: 00 00 1d a6 ldq a0,0(gp) 1c0: 11 04 ff 47 clr a1 1c4: 00 00 5d a6 ldq a2,0(gp) 1c8: e6 00 7f 22 lda a3,230 1cc: 00 00 7d a7 ldq t12,0(gp) 1d0: 00 40 5b 6b jsr ra,(t12),1d4 <_vm_object_allocate+0x16c> 1d4: 00 00 ba 27 ldah gp,0(ra) 1d8: 00 00 bd 23 lda gp,0(gp) 1dc: 00 00 5e a7 ldq ra,0(sp) 1e0: 08 00 3e a5 ldq s0,8(sp) 1e4: 10 00 5e a5 ldq s1,16(sp) 1e8: 20 00 de 23 lda sp,32(sp) 1ec: 01 80 fa 6b ret --------------- gcc 2.95 ------------------------------------ 00000000000000a0 <_vm_object_allocate>: a0: 00 00 bb 27 ldah gp,0(t12) a4: 00 00 bd 23 lda gp,0(gp) a8: e0 ff de 23 lda sp,-32(sp) ac: 00 00 5e b7 stq ra,0(sp) b0: 08 00 3e b5 stq s0,8(sp) b4: 10 00 5e b5 stq s1,16(sp) b8: 0a 04 f1 47 mov a1,s1 bc: 09 04 f2 47 mov a2,s0 c0: 30 00 e9 b7 stq zero,48(s0) c4: 01 14 26 41 addq s0,0x30,t0 c8: 38 00 29 b4 stq t0,56(s0) cc: 10 00 e9 b7 stq zero,16(s0) d0: 01 14 22 41 addq s0,0x10,t0 d4: 18 00 29 b4 stq t0,24(s0) d8: 5c 00 09 3a stb a0,92(s0) dc: 48 00 49 b5 stq s1,72(s0) e0: 01 00 3f 20 lda t0,1 e4: 50 00 29 b0 stl t0,80(s0) e8: 5e 00 e9 37 stw zero,94(s0) ec: b0 37 00 42 cmpule a0,0x1,a0 f0: 07 00 00 e6 beq a0,110 <_vm_object_allocate+0x70> f4: 10 04 e9 47 mov s0,a0 f8: 00 20 3f 22 lda a1,8192 fc: 00 00 7d a7 ldq t12,0(gp) 100: 00 40 5b 6b jsr ra,(t12),104 <_vm_object_allocate+0x64> 104: 00 00 ba 27 ldah gp,0(ra) 108: 00 00 bd 23 lda gp,0(gp) 10c: 00 00 e0 2f unop 110: a1 77 42 41 cmpule s1,0x13,t0 114: 13 00 3f 22 lda a1,19 118: 01 00 20 e4 beq t0,120 <_vm_object_allocate+0x80> 11c: 11 00 5f 41 addl s1,zero,a1 120: 00 00 7d a4 ldq t2,0(gp) 124: 00 00 e0 2f unop 128: 1f 04 ff 47 nop 12c: 00 00 e0 2f unop 130: 00 00 23 30 ldwu t0,0(t2) 134: 60 00 29 34 stw t0,96(s0) 138: 21 76 20 48 zapnot t0,0x3,t0 13c: 22 f6 21 48 zapnot t0,0xf,t1 140: 01 04 31 40 addq t0,a1,t0 144: 01 f0 23 44 and t0,0x1f,t0 148: 00 00 83 a8 ldl_l t3,0(t2) 14c: 24 f6 81 48 zapnot t3,0xf,t3 150: a4 05 82 40 cmpeq t3,t1,t3 154: 04 00 80 e4 beq t3,168 <_vm_object_allocate+0xc8> 158: 04 04 e1 47 mov t0,t3 15c: 00 00 83 b8 stl_c t3,0(t2) 160: 00 00 80 e4 beq t3,164 <_vm_object_allocate+0xc4> 164: 00 40 00 60 mb 168: 01 04 e4 47 mov t3,t0 16c: 21 f6 21 48 zapnot t0,0xf,t0 170: ef ff 3f e4 beq t0,130 <_vm_object_allocate+0x90> 174: 88 00 e9 b7 stq zero,136(s0) 178: 68 00 e9 b7 stq zero,104(s0) 17c: 70 00 e9 b7 stq zero,112(s0) 180: 00 00 7d a4 ldq t2,0(gp) 184: 00 00 e0 2f unop 188: 1f 04 ff 47 nop 18c: 00 00 e0 2f unop 190: 00 00 43 a0 ldl t1,0(t2) 194: 21 35 50 40 subq t1,0x81,t0 198: 58 00 29 b0 stl t0,88(s0) 19c: 22 f6 41 48 zapnot t1,0xf,t1 1a0: 21 f6 21 48 zapnot t0,0xf,t0 1a4: 00 00 83 a8 ldl_l t3,0(t2) 1a8: 24 f6 81 48 zapnot t3,0xf,t3 1ac: a4 05 82 40 cmpeq t3,t1,t3 1b0: 04 00 80 e4 beq t3,1c4 <_vm_object_allocate+0x124> 1b4: 04 04 e1 47 mov t0,t3 1b8: 00 00 83 b8 stl_c t3,0(t2) 1bc: 00 00 80 e4 beq t3,1c0 <_vm_object_allocate+0x120> 1c0: 00 40 00 60 mb 1c4: 01 04 e4 47 mov t3,t0 1c8: 21 f6 21 48 zapnot t0,0xf,t0 1cc: f0 ff 3f e4 beq t0,190 <_vm_object_allocate+0xf0> 1d0: 40 00 29 a0 ldl t0,64(s0) 1d4: 01 34 20 40 addq t0,0x1,t0 1d8: 40 00 29 b0 stl t0,64(s0) 1dc: 00 00 1d a6 ldq a0,0(gp) 1e0: 11 04 ff 47 clr a1 1e4: 00 00 5d a6 ldq a2,0(gp) 1e8: e4 00 7f 22 lda a3,228 1ec: 00 00 7d a7 ldq t12,0(gp) 1f0: 00 40 5b 6b jsr ra,(t12),1f4 <_vm_object_allocate+0x154> 1f4: 00 00 ba 27 ldah gp,0(ra) 1f8: 00 00 bd 23 lda gp,0(gp) 1fc: 00 00 e9 b7 stq zero,0(s0) 200: 00 00 5d a4 ldq t1,0(gp) 204: 08 00 22 a4 ldq t0,8(t1) 208: 08 00 29 b4 stq t0,8(s0) 20c: 08 00 22 a4 ldq t0,8(t1) 210: 00 00 21 b5 stq s0,0(t0) 214: 08 00 22 b5 stq s0,8(t1) 218: 00 00 1d a6 ldq a0,0(gp) 21c: 11 04 ff 47 clr a1 220: 00 00 5d a6 ldq a2,0(gp) 224: e6 00 7f 22 lda a3,230 228: 00 00 7d a7 ldq t12,0(gp) 22c: 00 40 5b 6b jsr ra,(t12),230 <_vm_object_allocate+0x190> 230: 00 00 ba 27 ldah gp,0(ra) 234: 00 00 bd 23 lda gp,0(gp) 238: 00 00 5e a7 ldq ra,0(sp) 23c: 08 00 3e a5 ldq s0,8(sp) 240: 10 00 5e a5 ldq s1,16(sp) 244: 20 00 de 23 lda sp,32(sp) 248: 01 80 fa 6b ret 24c: 00 00 e0 2f unop 250: 1f 04 ff 47 nop 254: 00 00 e0 2f unop 258: 1f 04 ff 47 nop 25c: 00 00 e0 2f unop To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message