Print this page
15254 %ymm registers not restored after signal handler
15367 x86 getfpregs() summons corrupting %xmm ghosts
15333 want x86 /proc xregs support (libc_db, libproc, mdb, etc.)
15336 want libc functions for extended ucontext_t
15334 want ps_lwphandle-specific reg routines
15328 FPU_CW_INIT mistreats reserved bit
15335 i86pc fpu_subr.c isn't really platform-specific
15332 setcontext(2) isn't actually noreturn
15331 need <sys/stdalign.h>
Change-Id: I7060aa86042dfb989f77fc3323c065ea2eafa9ad
Conflicts:
    usr/src/uts/common/fs/proc/prcontrol.c
    usr/src/uts/intel/os/archdep.c
    usr/src/uts/intel/sys/ucontext.h
    usr/src/uts/intel/syscall/getcontext.c

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/cstyle.pl
          +++ new/usr/src/tools/scripts/cstyle.pl
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14  # When distributing Covered Code, include this CDDL HEADER in each
  15   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  # Copyright 2015 Toomas Soome <tsoome@me.com>
  23   23  # Copyright 2016 Nexenta Systems, Inc.
  24      -# Copyright 2020 Oxide Computer Company
       24 +# Copyright 2023 Oxide Computer Company
  25   25  #
  26   26  # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  27   27  # Use is subject to license terms.
  28   28  #
  29   29  # Copyright (c) 2015 by Delphix. All rights reserved.
  30   30  #
  31   31  # @(#)cstyle 1.58 98/09/09 (from shannon)
  32   32  #
  33   33  # cstyle - check for some common stylistic errors.
  34   34  #
↓ open down ↓ 571 lines elided ↑ open up ↑
 606  606          # allow "for" statements to have empty "while" clauses
 607  607          if (/\s[,;]/ && !/^[\t]+;$/ && !/^\s*for \([^;]*; ;[^;]*\)/) {
 608  608                  err("comma or semicolon preceded by blank");
 609  609          }
 610  610          if (/^\s*(&&|\|\|)/) {
 611  611                  err("improper boolean continuation");
 612  612          }
 613  613          if (/\S   *(&&|\|\|)/ || /(&&|\|\|)   *\S/) {
 614  614                  err("more than one space around boolean operator");
 615  615          }
 616      -        if (/\b(for|if|while|switch|sizeof|return|case)\(/) {
      616 +        if (/\b(for|if|while|switch|sizeof|alignof|return|case)\(/) {
 617  617                  err("missing space between keyword and paren");
 618  618          }
 619  619          if (/(\b(for|if|while|switch|return)\b.*){2,}/ && !/^#define/) {
 620  620                  # multiple "case" and "sizeof" allowed
 621  621                  err("more than one keyword on line");
 622  622          }
 623      -        if (/\b(for|if|while|switch|sizeof|return|case)\s\s+\(/ &&
      623 +        if (/\b(for|if|while|switch|sizeof|alignof|return|case)\s\s+\(/ &&
 624  624              !/^#if\s+\(/) {
 625  625                  err("extra space between keyword and paren");
 626  626          }
 627  627          # try to detect "func (x)" but not "if (x)" or
 628  628          # "#define foo (x)" or "int (*func)();"
 629  629          if (/\w\s\(/) {
 630  630                  my $s = $_;
 631  631                  # strip off all keywords on the line
 632      -                s/\b(for|if|while|switch|return|case|sizeof)\s\(/XXX(/g;
      632 +                s/\b(for|if|while|switch|return|case|alignof|sizeof)\s\(/XXX(/g;
 633  633                  s/#elif\s\(/XXX(/g;
 634  634                  s/^#define\s+\w+\s+\(/XXX(/;
 635  635                  # do not match things like "void (*f)();"
 636  636                  # or "typedef void (func_t)();"
 637  637                  s/\w\s\(+\*/XXX(*/g;
 638  638                  s/\b($typename|void)\s+\(+/XXX(/og;
 639  639                  if (/\w\s\(/) {
 640  640                          err("extra space between function name and left paren");
 641  641                  }
 642  642                  $_ = $s;
↓ open down ↓ 12 lines elided ↑ open up ↑
 655  655          }
 656  656          if (/^#define /) {
 657  657                  err("#define followed by space instead of tab");
 658  658          }
 659  659          if (/^\s*return\W[^;]*;/ && !/^\s*return\s*\(.*\);/) {
 660  660                  err("unparenthesized return expression");
 661  661          }
 662  662          if (/\bsizeof\b/ && !/\bsizeof\s*\(.*\)/) {
 663  663                  err("unparenthesized sizeof expression");
 664  664          }
      665 +        if (/\balignof\b/ && !/\balignof\s*\(.*\)/) {
      666 +                err("unparenthesized alignof expression");
      667 +        }
 665  668          if (/\(\s/) {
 666  669                  err("whitespace after left paren");
 667  670          }
 668  671          # allow "for" statements to have empty "continue" clauses
 669  672          if (/\s\)/ && !/^\s*for \([^;]*;[^;]*; \)/) {
 670  673                  err("whitespace before right paren");
 671  674          }
 672  675          if (/^\s*\(void\)[^ ]/) {
 673  676                  err("missing space after (void) cast");
 674  677          }
↓ open down ↓ 345 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX