From owner-p4-projects@FreeBSD.ORG Mon Oct 22 08:53:26 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 35578154; Mon, 22 Oct 2012 08:53:26 +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 E544B113 for ; Mon, 22 Oct 2012 08:53:25 +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 A90F08FC0C for ; Mon, 22 Oct 2012 08:53:25 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q9M8rP1W088857 for ; Mon, 22 Oct 2012 08:53:25 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q9M8rPcR088853 for perforce@freebsd.org; Mon, 22 Oct 2012 08:53:25 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 22 Oct 2012 08:53:25 GMT Message-Id: <201210220853.q9M8rPcR088853@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 218893 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, 22 Oct 2012 08:53:26 -0000 http://p4web.freebsd.org/@@218893?ac=10 Change 218893 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/10/22 08:52:46 Update CheriBSD's userspace CHERI exercising tool for ISAv2 changes. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/bin/cheritest/cheritest.c#3 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/bin/cheritest/cheritest.c#3 (text+ko) ==== @@ -39,12 +39,12 @@ #include #include -#define CP2_REG_PRINT(crn) do { \ - struct capability c; \ +#define CHERI_CAPREG_PRINT(crn) do { \ + struct chericap c; \ \ - CP2_CR_GET((crn), c); \ - printf("C%u perms %04jx otype %016jx\n", crn, \ - (uintmax_t)c.c_uperms, (uintmax_t)c.u.c_otype); \ + CHERI_GETCAPREG((crn), c); \ + printf("C%u perms %04jx type %016jx\n", crn, \ + (uintmax_t)c.c_perms, (uintmax_t)c.c_otype); \ printf("\tbase %016jx length %016jx\n", (uintmax_t)c.c_base, \ (uintmax_t)c.c_length); \ } while (0) @@ -63,13 +63,13 @@ cheritest_copyregs(void) { - CP2_CR_MOVE(1, 0); - CP2_CR_MOVE(2, 0); - CP2_CR_MOVE(3, 0); - CP2_CR_MOVE(4, 0); - CP2_CR_MOVE(5, 0); - CP2_CR_MOVE(6, 0); - CP2_CR_MOVE(7, 0); + CHERI_CMOVE(1, 0); + CHERI_CMOVE(2, 0); + CHERI_CMOVE(3, 0); + CHERI_CMOVE(4, 0); + CHERI_CMOVE(5, 0); + CHERI_CMOVE(6, 0); + CHERI_CMOVE(7, 0); } static void @@ -81,38 +81,38 @@ * -- register numbers must be available at compile-time. */ printf("CP2 registers:\n"); - CP2_REG_PRINT(0); - CP2_REG_PRINT(1); - CP2_REG_PRINT(2); - CP2_REG_PRINT(3); - CP2_REG_PRINT(4); - CP2_REG_PRINT(5); - CP2_REG_PRINT(6); - CP2_REG_PRINT(7); - CP2_REG_PRINT(8); - CP2_REG_PRINT(9); - CP2_REG_PRINT(10); - CP2_REG_PRINT(11); - CP2_REG_PRINT(12); - CP2_REG_PRINT(13); - CP2_REG_PRINT(14); - CP2_REG_PRINT(15); - CP2_REG_PRINT(16); - CP2_REG_PRINT(17); - CP2_REG_PRINT(18); - CP2_REG_PRINT(19); - CP2_REG_PRINT(20); - CP2_REG_PRINT(21); - CP2_REG_PRINT(22); - CP2_REG_PRINT(23); - CP2_REG_PRINT(24); - CP2_REG_PRINT(25); - CP2_REG_PRINT(26); - CP2_REG_PRINT(27); - CP2_REG_PRINT(28); - CP2_REG_PRINT(29); - CP2_REG_PRINT(30); - CP2_REG_PRINT(31); + CHERI_CAPREG_PRINT(0); + CHERI_CAPREG_PRINT(1); + CHERI_CAPREG_PRINT(2); + CHERI_CAPREG_PRINT(3); + CHERI_CAPREG_PRINT(4); + CHERI_CAPREG_PRINT(5); + CHERI_CAPREG_PRINT(6); + CHERI_CAPREG_PRINT(7); + CHERI_CAPREG_PRINT(8); + CHERI_CAPREG_PRINT(9); + CHERI_CAPREG_PRINT(10); + CHERI_CAPREG_PRINT(11); + CHERI_CAPREG_PRINT(12); + CHERI_CAPREG_PRINT(13); + CHERI_CAPREG_PRINT(14); + CHERI_CAPREG_PRINT(15); + CHERI_CAPREG_PRINT(16); + CHERI_CAPREG_PRINT(17); + CHERI_CAPREG_PRINT(18); + CHERI_CAPREG_PRINT(19); + CHERI_CAPREG_PRINT(20); + CHERI_CAPREG_PRINT(21); + CHERI_CAPREG_PRINT(22); + CHERI_CAPREG_PRINT(23); + CHERI_CAPREG_PRINT(24); + CHERI_CAPREG_PRINT(25); + CHERI_CAPREG_PRINT(26); + CHERI_CAPREG_PRINT(27); + CHERI_CAPREG_PRINT(28); + CHERI_CAPREG_PRINT(29); + CHERI_CAPREG_PRINT(30); + CHERI_CAPREG_PRINT(31); } int