⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 altivec-regs.c

📁 gdb-6.8 Linux下的调试程序 最新版本
💻 C
字号:
#include <altivec.h>#include <stdio.h>vector unsigned intvector_fun (vector unsigned int a, vector unsigned int b){  vector unsigned int c;  a = ((vector unsigned int) vec_splat_u8(2));  b = ((vector unsigned int) vec_splat_u8(3));  c = vec_add (a, b);  return c;} intmain (){  vector unsigned int y;   vector unsigned int x;   vector unsigned int z;   int a;  /* This line may look unnecessary but we do need it, because we want to     have a line to do a next over (so that gdb refetches the registers)     and we don't want the code to change any vector registers.     The splat operations below modify the VRs,i     so we don't want to execute them yet.  */  a = 9;  x = ((vector unsigned int) vec_splat_u8 (-2));  y = ((vector unsigned int) vec_splat_u8 (1));	  z = vector_fun (x, y);  x = vec_sld (x,y,2);  x = vec_add (x, ((vector unsigned int){5,6,7,8}));  z = (vector unsigned int) vec_splat_u8 ( -2);  y = vec_add (x, z);  z = (vector unsigned int) vec_cmpeq (x,y);  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -