From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6506 invoked by alias); 12 Mar 2006 18:58:38 -0000 Received: (qmail 6493 invoked by uid 48); 12 Mar 2006 18:58:36 -0000 Date: Sun, 12 Mar 2006 18:58:00 -0000 Message-ID: <20060312185836.6492.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/26655] ICE in ix86_secondary_memory_needed, at config/i386/i386.c:16446 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg01309.txt.bz2 List-Id: ------- Comment #4 from pinskia at gcc dot gnu dot org 2006-03-12 18:58 ------- This is invalid inline-asm: static inline uint64_t read_time(void) { uint64_t a, d; asm volatile( "rdtsc\n\t" : "=a" (a), "=d" (d) ); return (d << 32) | (a & 0xffffffff); } ----- The correct way to implement this inline is: static inline uint64_t read_time(void) { uint32_t a, d; asm volatile( "rdtsc\n\t" : "=a" (a), "=d" (d) ); return (((uint64_t)d) << 32) | (((uint64_t)a) & 0xffffffff); } After that it works :). -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |minor Keywords| |error-recovery, ice-on- | |invalid-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26655