Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2006 21:50:11 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/sparc64/include endian.h src/sys/sun4v/include endian.h
Message-ID:  <200610302150.k9ULoBXi041075@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marius      2006-10-30 21:50:11 UTC

  FreeBSD src repository

  Modified files:
    sys/sparc64/include  endian.h 
    sys/sun4v/include    endian.h 
  Log:
  In the replacement text of the __bswapN_const() macros encapsulate the
  argument in parentheses so these macros are safe to use and invocations
  with an expression as the argument like __bswap32_const(42 << 23 | 13)
  work as expected. Additionally, mask all the individually shifted bytes
  as appropriate so the bytes which exceed the width of the respective
  __bswapN_const() macro in invocations like __bswap16_const(0xdead600d)
  are ignored like it's the case with the corresponding __bswapN_var()
  function.
  
  MFC after:      3 days
  
  Revision  Changes    Path
  1.16      +12 -8     src/sys/sparc64/include/endian.h
  1.2       +12 -8     src/sys/sun4v/include/endian.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610302150.k9ULoBXi041075>