From owner-p4-projects@FreeBSD.ORG Mon Nov 12 01:35:53 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2D377A70; Mon, 12 Nov 2012 01:35:53 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0C46A6E for ; Mon, 12 Nov 2012 01:35:52 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id C5C278FC12 for ; Mon, 12 Nov 2012 01:35:52 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.5/8.14.5) with ESMTP id qAC1ZqQj039127 for ; Mon, 12 Nov 2012 01:35:52 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.5/8.14.5/Submit) id qAC1Zqx8039124 for perforce@freebsd.org; Mon, 12 Nov 2012 01:35:52 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 12 Nov 2012 01:35:52 GMT Message-Id: <201211120135.qAC1Zqx8039124@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 219753 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Nov 2012 01:35:53 -0000 http://p4web.freebsd.org/@@219753?ac=10 Change 219753 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2012/11/12 01:35:02 Implement CHERI_CLW() C-language macro around CHERI CLW instruction. Annotate that we're not able to use immediates due to assembler limitations here, and above where we also have store-related CHERI instructions. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheri.h#13 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheri.h#13 (text+ko) ==== @@ -163,6 +163,8 @@ /* * Data stores; while these don't muck with c0, they do require memory * clobbers. + * + * XXXRW: immediates not yet supported by the assembler. */ #define CHERI_CSB(rs, rt, offset, cb) do { \ __asm__ __volatile__ ("csb %0, %1($c%2)" : : \ @@ -185,6 +187,17 @@ } while (0) /* + * Data loads: while these don't much with c0, they do require memory + * clobbers. + * + * XXXRW: immediates not yet supported by the assembler. + */ +#define CHERI_CLW(rd, rt, offset, cb) do { \ + __asm__ __volatile__ ("clw %0, %1($c%2)" : \ + "=r" (rd) : "r" (rt), "i" (cb) : "memory"); \ +} while (0) + +/* * Routines that modify or replace values in capability registers, and that if * if used on C0, require the compiler to write registers back to memory, and * reload afterwards, since we may effectively be changing the compiler-