On Thu, Dec 24, 2020 at 12:25:40AM +0100, Patrick Wildt wrote: > > On Fri, Dec 18, 2020 at 10:33:52PM +0100, Mark Kettenis wrote: > > > > > The diff below disables the optimized functions on little-endian > > > architectures such that we always use rasops1_putchar(). This makes > > > ssdfb(4) work with the default 8x16 font on arm64. > > > > I noticed it was committed already, but it seems the following > > directives: > > > > #if defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN > > > > Should have been: > > > > #if !defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN > > > > We want to include the optimized putchar functions only if RASOPS_SMALL > > is not defined. > > > > True that. In one #endif comment he actually kept the !, but the actual > ifs lost it.
Here is a diff to fix the issue, which includes the optimized putchar functions only if RASOPS_SMALL is not defined. Comments? OK? Index: sys/dev/rasops/rasops1.c =================================================================== RCS file: /cvs/src/sys/dev/rasops/rasops1.c,v retrieving revision 1.11 diff -u -p -r1.11 rasops1.c --- sys/dev/rasops/rasops1.c 21 Dec 2020 12:58:42 -0000 1.11 +++ sys/dev/rasops/rasops1.c 7 Jan 2021 11:08:55 -0000 @@ -44,7 +44,7 @@ int rasops1_copycols(void *, int, int, i int rasops1_erasecols(void *, int, int, int, uint32_t); int rasops1_do_cursor(struct rasops_info *); int rasops1_putchar(void *, int, int col, u_int, uint32_t); -#if defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN +#if !defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN int rasops1_putchar8(void *, int, int col, u_int, uint32_t); int rasops1_putchar16(void *, int, int col, u_int, uint32_t); #endif @@ -58,7 +58,7 @@ rasops1_init(struct rasops_info *ri) rasops_masks_init(); switch (ri->ri_font->fontwidth) { -#if defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN +#if !defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN case 8: ri->ri_ops.putchar = rasops1_putchar8; break; @@ -223,7 +223,7 @@ rasops1_putchar(void *cookie, int row, i return 0; } -#if defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN +#if !defined(RASOPS_SMALL) && BYTE_ORDER == BIG_ENDIAN /* * Paint a single character. This is for 8-pixel wide fonts. */