1f08c3bdfSopenharmony_cishort smask(short x) 2f08c3bdfSopenharmony_ci{ 3f08c3bdfSopenharmony_ci return x & (short) 0x7fff; 4f08c3bdfSopenharmony_ci} 5f08c3bdfSopenharmony_ci 6f08c3bdfSopenharmony_cishort umask(unsigned short x) 7f08c3bdfSopenharmony_ci{ 8f08c3bdfSopenharmony_ci return x & (unsigned short) 0x7fff; 9f08c3bdfSopenharmony_ci} 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_ci/* 12f08c3bdfSopenharmony_ci * check-name: and-trunc 13f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl $file 14f08c3bdfSopenharmony_ci * 15f08c3bdfSopenharmony_ci * check-output-ignore 16f08c3bdfSopenharmony_ci * check-output-excludes: sext\\. 17f08c3bdfSopenharmony_ci * check-output-excludes: zext\\. 18f08c3bdfSopenharmony_ci * check-output-excludes: trunc\\. 19f08c3bdfSopenharmony_ci * check-output-contains: and\\.16 20f08c3bdfSopenharmony_ci */ 21