From: Jacob Lifshay Date: Fri, 22 Apr 2022 01:12:06 +0000 (-0700) Subject: add stuff for clang-format X-Git-Tag: opf_rfc_ls005_v1~2630 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c6294aec3fe23e9d75a33eae9f496d1d846986c;p=libreriscv.git add stuff for clang-format --- diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..4f236caeb --- /dev/null +++ b/.clang-format @@ -0,0 +1,2 @@ +BasedOnStyle: Microsoft +ColumnLimit: 79 diff --git a/openpower/sv/biginteger/divmnu64.c b/openpower/sv/biginteger/divmnu64.c index 7ab938ea7..5c8bdb2cb 100644 --- a/openpower/sv/biginteger/divmnu64.c +++ b/openpower/sv/biginteger/divmnu64.c @@ -308,6 +308,7 @@ void check(unsigned q[], unsigned r[], int main() { static unsigned test[] = { + // clang-format off // m, n, u..., v..., cq..., cr.... 1, 1, 3, 0, 1, 1, // Error, divide by 0. 1, 2, 7, 1,3, 0, 7,0, // Error, n > m. @@ -343,6 +344,7 @@ int main() { 4, 3, 0,0x0000fffe,0,0x00008000, 0x0000ffff,0,0x00008000, 0xffffffff,0, 0x0000ffff,0xffffffff,0x00007fff, // Shows that mult-sub quantity cannot be treated as signed. 4, 3, 0,0xfffffffe,0,0x80000000, 0x0000ffff,0,0x80000000, 0x00000000,1, 0x00000000,0xfffeffff,0x00000000, // Shows that mult-sub quantity cannot be treated as signed. 4, 3, 0,0xfffffffe,0,0x80000000, 0xffffffff,0,0x80000000, 0xffffffff,0, 0xffffffff,0xffffffff,0x7fffffff, // Shows that mult-sub quantity cannot be treated as signed. + // clang-format on }; int i, n, m, ncases, f; unsigned q[10], r[10]; diff --git a/openpower/sv/biginteger/mulmnu.c b/openpower/sv/biginteger/mulmnu.c index a38afc4be..49f2400ab 100644 --- a/openpower/sv/biginteger/mulmnu.c +++ b/openpower/sv/biginteger/mulmnu.c @@ -66,6 +66,7 @@ void check(unsigned short result[], unsigned short u[], int main() { static unsigned short test[] = { + // clang-format off // m, n, u ..., v ..., result. 1, 1, 7, 3, 21,0, 1, 1, 2, 0xFFFF, 0xFFFE,0x0001, // 2*FFFF = 0001_FFFE. @@ -77,6 +78,7 @@ int main() { 2, 3, 400, 65535, 500, 100, 65534, 0x0D40,0x9A4F,0xFE70,0x01F5,0xFFFD, 4, 4, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 1, 0, 0, 0, 65534, 65535, 65535, 65535, + // clang-format on }; int i, n, m, ncases; unsigned short result[10];