xlC和类型“vector unsigned int”和“int”之间的操作是不允许的

您所在的位置:网站首页 ios模拟器是什么意思 xlC和类型“vector unsigned int”和“int”之间的操作是不允许的

xlC和类型“vector unsigned int”和“int”之间的操作是不允许的

2023-02-21 23:20| 来源: 网络整理| 查看: 265

我试图在PPC64-LE上编译源文件。我正在使用xlC编译器,编译失败。海湾合作委员会接受该计划,所以我不确定问题的原因是什么。xlC和类型“vector unsigned int”和“int”之间的操作是不允许的

这里的命令行:

$ xlc test-p8.c -qarch=pwr8 -qaltivec -o test-p8.exe

这里的编译错误:

"test-p8.c", line 113.52: 1506-324 (S) "int" cannot be converted to "vector unsigned int". "test-p8.c", line 120.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 121.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 122.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 123.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 124.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 125.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 126.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 127.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 128.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed. "test-p8.c", line 130.15: 1506-068 (S) Operation between types "vector unsigned int" and "int" is not allowed.

这里的源文件的相关部分。源文件是another problem的缩减格式,它的格式为available on GitHub。

$ cat -n test-p8.c ... 12 typedef unsigned char uint8_t; 13 typedef unsigned long long uint64_t; 14 typedef vector unsigned char uint8x16_p8; 15 typedef vector unsigned int uint64x2_p8; ... 76 __attribute__((aligned(16))) 77 uint8_t ks[176] = { 78 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x9, 0xcf, 0x4f, 0x3c, ... 89 }; ... 113 uint64x2_p8 block = (uint64x2_p8)vec_vsx_ld(0U, (const uint8_t*)plain); ... 118 block = vec_xor(block, (uint64x2_p8)vec_ld(0U, (const uint8_t*)ks)); ... 120 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(16U, (const uint8_t*)ks)); 121 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(32U, (const uint8_t*)ks)); 122 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(48U, (const uint8_t*)ks)); 123 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(64U, (const uint8_t*)ks)); 124 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(80U, (const uint8_t*)ks)); 125 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(96U, (const uint8_t*)ks)); 126 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(112U, (const uint8_t*)ks)); 127 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(128U, (const uint8_t*)ks)); 128 block = __builtin_crypto_vcipher(block, (uint64x2_p8)vec_ld(144U, (const uint8_t*)ks)); 129 130 block = __builtin_crypto_vcipherlast(block, (uint64x2_p8)vec_ld(160U, (const uint8_t*)ks));

__builtin_crypto_vcipher是内置了GCC,以及IBM指出xlC supports it。

第118行就像上面显示的所有其他行一样,但它不会触发警告或错误。

问题是什么,如何解决?

来源

2017-09-07 jww



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3