Added "what" script. Moved miscellaneous tools (sizeofchk, what)
into their own "misc-tools" sub-directory and updated README.md to reflect the change.
This commit is contained in:
parent
b0196162a9
commit
787c1866e2
5 changed files with 15 additions and 2 deletions
|
|
@ -1,46 +0,0 @@
|
|||
/* simple utility to print out sizeof values...
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <x86intrin.h>
|
||||
#include "sizeofchk.h" /* generated by makefile */
|
||||
|
||||
static char version[] = VERSION_STRING;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
int (*funcptr)();
|
||||
|
||||
printf("Sizeof Utility by Ed Braaten - Version %s\n", version);
|
||||
printf("Running on %s (%s %s)\n", ARCHINFO, SYSINFO, RELEASEINFO);
|
||||
printf("Compiler version: '%s'\n\n", COMPILEINFO);
|
||||
|
||||
printf(" sizeof(char) = %lu bits\n", sizeof(char) * 8);
|
||||
printf(" sizeof(short) = %lu bits\n", sizeof(short) * 8);
|
||||
printf(" sizeof(int) = %lu bits\n", sizeof(int) * 8);
|
||||
printf(" sizeof(long int) = %lu bits\n", sizeof(long int) * 8);
|
||||
printf(" sizeof(long) = %lu bits\n", sizeof(long) * 8);
|
||||
printf(" sizeof(long long) = %lu bits\n", sizeof(long long) * 8);
|
||||
printf(" sizeof(float) = %lu bits\n", sizeof(float) * 8);
|
||||
printf(" sizeof(double) = %lu bits\n", sizeof(double) * 8);
|
||||
printf(" sizeof(long double) = %lu bits\n", sizeof(long double) * 8);
|
||||
printf(" sizeof(char *) = %lu bits\n", sizeof(char *) * 8);
|
||||
printf(" sizeof((*)()) = %lu bits\n", sizeof(funcptr) * 8);
|
||||
|
||||
#ifdef __SSE__
|
||||
printf("\nSSE types\n\n");
|
||||
printf(" sizeof(__m64) = %lu bits\n", sizeof(__m64) * 8);
|
||||
printf(" sizeof(__m128) = %lu bits\n", sizeof(__m128) * 8);
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
/* clang doesn't support __float128 */
|
||||
#else
|
||||
#ifdef __SSE2__
|
||||
printf(" sizeof(__float128) = %lu bits\n", sizeof(__float128) * 8);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
printf("\n");
|
||||
return(0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue