From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18417 invoked by alias); 19 May 2009 23:35:07 -0000 Received: (qmail 18407 invoked by uid 22791); 19 May 2009 23:35:07 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 May 2009 23:35:02 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n4JNYdr3021538 for ; Tue, 19 May 2009 19:35:00 -0400 Received: from greed.delorie.com (vpn-12-168.rdu.redhat.com [10.11.12.168]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4JNYdSK000663 for ; Tue, 19 May 2009 19:34:39 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1] (may be forged)) by greed.delorie.com (8.14.3/8.14.3) with ESMTP id n4JNYcnw007347 for ; Tue, 19 May 2009 19:34:38 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.3/8.14.3/Submit) id n4JNYcCK007344; Tue, 19 May 2009 19:34:38 -0400 Date: Tue, 19 May 2009 23:35:00 -0000 Message-Id: <200905192334.n4JNYcCK007344@greed.delorie.com> From: DJ Delorie To: cgen@sourceware.org Subject: [patch] fix MeP CPU detection and defaults Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00019.txt.bz2 Committed. 2009-05-19 DJ Delorie * cpu/mep.opc: Regenerate configuration. (parse_cdisp10): Only check CPU flags, not COP flags. (check_configured_mach): Likewise. Index: cpu/mep.opc =================================================================== RCS file: /cvs/src/src/cgen/cpu/mep.opc,v retrieving revision 1.4 diff -p -U3 -r1.4 cpu/mep.opc --- cpu/mep.opc 30 Apr 2009 21:07:57 -0000 1.4 +++ cpu/mep.opc 19 May 2009 23:32:53 -0000 @@ -516,7 +516,7 @@ parse_cdisp10 (CGEN_CPU_DESC cd, break; } - if (MEP_CPU == EF_MEP_CPU_C5) + if ((MEP_CPU & EF_MEP_CPU_MASK) == EF_MEP_CPU_C5) wide = 1; if (strncmp (*strp, "0x0", 3) == 0 @@ -1527,8 +1527,8 @@ mep_insn_supported_by_isa (const CGEN_IN mep_config_map_struct mep_config_map[] = { /* config-map-start */ - /* Default entry: mep core only, all options enabled. */ - { "", 0, EF_MEP_CPU_C5, 1, 0, {1,"\x0"}, {1,"\x0"}, {1,"\x0"}, {1,"\x0"}, {1,"\x0"}, {1,"\x80"}, OPTION_MASK }, + /* Default entry: first module, with all options enabled. */ + { "", 0, EF_MEP_COP_IVC2 | EF_MEP_CPU_C5,1, 0, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, OPTION_MASK | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) }, { "default", CONFIG_DEFAULT, EF_MEP_COP_IVC2 | EF_MEP_CPU_C5, 0, 64, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, 0 | (1 << CGEN_INSN_OPTIONAL_CP_INSN) @@ -1553,7 +1553,7 @@ check_configured_mach (int machs) { /* All base insns are supported. */ int mach = 1 << MACH_BASE; - switch (MEP_CPU) + switch (MEP_CPU & EF_MEP_CPU_MASK) { case EF_MEP_CPU_C2: case EF_MEP_CPU_C3: