Date: Mon, 22 Oct 2012 08:53:25 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 218893 for review Message-ID: <201210220853.q9M8rPcR088853@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sysexits.h> #include <unistd.h> -#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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210220853.q9M8rPcR088853>