📄 swap.c
字号:
/* $Header: /usr/cvsroot/target/src/wrn/wm/demo/lib/swap.c,v 1.3 2003/01/15 14:04:37 josh Exp $ *//* * Copyright (C) 1999-2005 Wind River Systems, Inc. * All rights reserved. Provided under license only. * Distribution or other use of this software is only * permitted pursuant to the terms of a license agreement * from Wind River Systems (and is otherwise prohibited). * Refer to that license agreement for terms of use. *//**************************************************************************** * Copyright 1993-1997 Epilogue Technology Corporation. * Copyright 1998 Integrated Systems, Inc. * All rights reserved. ****************************************************************************//* * $Log: swap.c,v $ * Revision 1.3 2003/01/15 14:04:37 josh * directory structure shifting * * Revision 1.2 2001/11/08 15:56:30 tneale * Updated for newest file layout * * Revision 1.1.1.1 2001/11/05 17:48:43 tneale * Tornado shuffle * * Revision 1.3 2001/01/19 22:23:55 paul * Update copyright. * * Revision 1.2 2000/03/17 00:12:48 meister * Update copyright message * * Revision 1.1 1998/07/15 20:58:21 sra * Initial version. * *//* [clearcase]modification history-------------------01a,19apr05,job update copyright notices*//* * Swap routines for Snark. You can almost certainly do better than * this in assembly language. */#include <wrn/wm/common/config.h>#include <wrn/wm/common/glue.h>#include <wrn/wm/demo/snarklib.h>#if INSTALL_ATTACHEbits16_t glue_swap16(bits16_t goes_inta){ bits16_t goes_outa = (goes_inta & 0xFF); goes_inta >>= 8; goes_outa <<= 8; return goes_outa | (goes_inta & 0xFF); }bits32_t glue_swap32(bits32_t goes_inta){ bits32_t goes_outa = (goes_inta & 0xFF); goes_inta >>= 8; goes_outa <<= 8; goes_outa |= (goes_inta & 0xFF); goes_inta >>= 8; goes_outa <<= 8; goes_outa |= (goes_inta & 0xFF); goes_inta >>= 8; goes_outa <<= 8; return goes_outa | (goes_inta & 0xFF);}#endif /* INSTALL_ATTACHE */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -