Home
last modified time | relevance | path

Searched refs:shf (Results 1 – 25 of 34) sorted by relevance

12

/external/mksh/src/
Dshf.c40 static int shf_fillbuf(struct shf *);
41 static int shf_emptybuf(struct shf *, int);
48 struct shf *
51 struct shf *shf; in shf_open() local
58 shf = alloc(sizeof(struct shf) + bsize, ATEMP); in shf_open()
59 shf->areap = ATEMP; in shf_open()
60 shf->buf = (unsigned char *)&shf[1]; in shf_open()
61 shf->bsize = bsize; in shf_open()
62 shf->flags = SHF_ALLOCS; in shf_open()
68 afree(shf, shf->areap); in shf_open()
[all …]
Dtree.c30 static void ptree(struct op *, int, struct shf *);
31 static void pioact(struct shf *, struct ioword *);
32 static const char *wdvarput(struct shf *, const char *, int, int);
33 static void vfptreef(struct shf *, int, const char *, va_list);
46 ptree(struct op *t, int indent, struct shf *shf) in ptree() argument
77 fptreef(shf, indent, Tf_S, t->vars[0]); in ptree()
84 fptreef(shf, indent, Tf_S_, *w++); in ptree()
86 shf_puts("#no-vars# ", shf); in ptree()
90 fptreef(shf, indent, Tf_S_, *w++); in ptree()
92 shf_puts("#no-args# ", shf); in ptree()
[all …]
Dsh.h1161 struct shf *shf; member
1370 #define shf_fileno(shf) ((shf)->fd) argument
1371 #define shf_setfileno(shf,nfd) ((shf)->fd = (nfd)) argument
1372 #define shf_getc_i(shf) ((shf)->rnleft > 0 ? \ argument
1373 (shf)->rnleft--, *(shf)->rp++ : \
1374 shf_getchar(shf))
1375 #define shf_putc_i(c, shf) ((shf)->wnleft == 0 ? \ argument
1376 shf_putchar((uint8_t)(c), (shf)) : \
1377 ((shf)->wnleft--, *(shf)->wp++ = (c)))
1378 #define shf_eof(shf) ((shf)->flags & SHF_EOF) argument
[all …]
Deval.c45 struct shf *shf; member
427 struct shf shf; in expand() local
429 shf_sopen(NULL, 0, SHF_WR|SHF_DYNAMIC, &shf); in expand()
430 print_value_quoted(&shf, str_val(st->var)); in expand()
431 x.str = shf_sclose(&shf); in expand()
873 if (x.u.shf == NULL) { in expand()
883 while ((c = shf_getc(x.u.shf)) == 0 || c == '\n') in expand()
888 shf_ungetc(c, x.u.shf); in expand()
895 if (x.u.shf) in expand()
896 shf_close(x.u.shf); in expand()
[all …]
Dmain.c483 s->u.shf = shf_open(s->file, O_RDONLY, 0, in main_init()
485 if (s->u.shf == NULL) { in main_init()
497 s->u.shf = shf_fdopen(0, SHF_RD | can_seek(0), in main_init()
503 s->u.shf->flags |= SHF_INTERRUPT; in main_init()
679 struct shf *shf; in include() local
684 shf = shf_open(name, O_RDONLY, 0, SHF_MAPHI | SHF_CLEXEC); in include()
685 if (shf == NULL) in include()
697 quitenv(s ? s->u.shf : NULL); in include()
730 s->u.shf = shf; in include()
733 quitenv(s->u.shf); in include()
[all …]
Dmisc.c215 co.shf = shl_stdout; in printoptions()
1116 print_value_quoted(struct shf *shf, const char *s) in print_value_quoted() argument
1131 shf_puts(s, shf); in print_value_quoted()
1144 shf_putc('\'', shf); in print_value_quoted()
1147 shf_putc('\\', shf); in print_value_quoted()
1149 shf_putc('\'', shf); in print_value_quoted()
1152 shf_putc(c, shf); in print_value_quoted()
1159 shf_putc('$', shf); in print_value_quoted()
1160 shf_putc('\'', shf); in print_value_quoted()
1166 shf_fprintf(shf, "\\u%04X", wc); in print_value_quoted()
[all …]
Dlex.c1380 char *p = shf_getse(xp, Xnleft(s->xs, xp), s->u.shf); in getsc_line()
1382 if (!p && shf_error(s->u.shf) && in getsc_line()
1383 shf_errno(s->u.shf) == EINTR) { in getsc_line()
1384 shf_clearerr(s->u.shf); in getsc_line()
1406 shf_flush(s->u.shf); in getsc_line()
1425 shf_fdclose(s->u.shf); in getsc_line()
1465 struct shf *shf; in set_prompt() local
1471 shf = shf_sopen(NULL, strlen(ps1) * 2, in set_prompt()
1475 shf_putchar(*ps1++, shf); in set_prompt()
1477 shf_fprintf(shf, Tf_lu, s ? in set_prompt()
[all …]
Dhistrap.c87 struct shf *shf; in c_fc() local
296 if (!(shf = tf->shf)) { in c_fc()
302 shf_fprintf(shf, Tf_sN, *hp); in c_fc()
303 if (shf_close(shf) == -1) { in c_fc()
320 if (!(shf = shf_open(tf->tffn, O_RDONLY, 0, 0))) { in c_fc()
334 while ((n = shf_read(xp, Xnleft(xs, xp), shf)) > 0) { in c_fc()
341 cstrerror(shf_errno(shf))); in c_fc()
343 shf_close(shf); in c_fc()
346 shf_close(shf); in c_fc()
Dexec.c1519 hereinval(struct ioword *iop, int sub, char **resbuf, struct shf *shf) in hereinval() argument
1528 quitenv(shf); in hereinval()
1546 shf_puts(ccp, shf); in hereinval()
1558 struct shf *shf; in herein() local
1574 if (!(shf = h->shf) || (fd = binopen3(h->tffn, O_RDONLY, 0)) < 0) { in herein()
1577 !shf ? Tcreate : Topen, h->tffn, cstrerror(i)); in herein()
1578 if (shf) in herein()
1579 shf_close(shf); in herein()
1584 if (hereinval(iop, i, NULL, shf) == -2) { in herein()
1590 if (shf_close(shf) == -1) { in herein()
[all …]
Djobs.c133 static struct shf *shl_j;
143 static void j_print(Job *, int, struct shf *);
1524 j_print(Job *j, int how, struct shf *shf) in j_print() argument
1541 shf_fprintf(shf, Tf_dN, (int)(j->pgrp ? j->pgrp : in j_print()
1602 shf_fprintf(shf, "[%d] %c ", j->job, jobchar); in j_print()
1604 shf_puts(filler, shf); in j_print()
1608 shf_fprintf(shf, "%5d ", (int)p->pid); in j_print()
1613 shf_fprintf(shf, "%s%s ", in j_print()
1618 shf_fprintf(shf, "%-20s %s%s%s", buf, p->command, in j_print()
1628 shf_fprintf(shf, "%s%5d %-20s %s%s", filler, in j_print()
[all …]
Dfuncs.c240 static void p_time(struct shf *, bool, long, int, int,
538 co.shf = shf_sopen(NULL, 128, SHF_WR | SHF_DYNAMIC, NULL); in c_print()
545 w = co.shf->wp - co.shf->buf; in c_print()
547 memcpy(xp, co.shf->buf, w); in c_print()
549 shf_sclose(co.shf); in c_print()
1525 co.shf = shl_stdout; in c_kill()
2679 p_time(struct shf *shf, bool posix, long tv_sec, int tv_usec, int width, in p_time() argument
2684 shf_fprintf(shf, "%s%*ld.%02d%s", prefix, width, in p_time()
2687 shf_fprintf(shf, "%s%*ldm%02d.%02ds%s", prefix, width, in p_time()
/external/llvm/test/MC/Mips/msa/
Dtest_i8.s9 # CHECK: shf.b $w19, $w30, 105 # encoding: [0x78,0x69,0xf4,0xc2]
10 # CHECK: shf.h $w17, $w8, 76 # encoding: [0x79,0x4c,0x44,0x42]
11 # CHECK: shf.w $w14, $w3, 93 # encoding: [0x7a,0x5d,0x1b,0x82]
20 shf.b $w19, $w30, 105
21 shf.h $w17, $w8, 76
22 shf.w $w14, $w3, 93
Dinvalid-64.s40 shf.b $w19, $w30, -1 # CHECK: :[[@LINE]]:23: error: expected 8-bit unsigned immediate
41 shf.h $w17, $w8, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
42 shf.w $w14, $w3, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
Dinvalid.s208 shf.b $w19, $w30, -1 # CHECK: :[[@LINE]]:23: error: expected 8-bit unsigned immediate
209 shf.b $w19, $w30, 256 # CHECK: :[[@LINE]]:23: error: expected 8-bit unsigned immediate
210 shf.h $w17, $w8, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
211 shf.h $w17, $w8, 256 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
212 shf.w $w14, $w3, -1 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
213 shf.w $w14, $w3, 256 # CHECK: :[[@LINE]]:22: error: expected 8-bit unsigned immediate
/external/llvm/test/CodeGen/NVPTX/
Drotate.ll16 ; SM35: shf.l.wrap.b32
28 ; SM35: shf.l.wrap.b32
29 ; SM35: shf.l.wrap.b32
41 ; SM35: shf.r.wrap.b32
42 ; SM35: shf.r.wrap.b32
53 ; SM35: shf.l.wrap.b32
/external/llvm/test/MC/Disassembler/Mips/msa/
Dtest_i8.txt9 0x78 0x69 0xf4 0xc2 # CHECK: shf.b $w19, $w30, 105
10 0x79 0x4c 0x44 0x42 # CHECK: shf.h $w17, $w8, 76
11 0x7a 0x5d 0x1b 0x82 # CHECK: shf.w $w14, $w3, 93
/external/llvm/test/CodeGen/Mips/msa/
Di8.ll142 %1 = tail call <16 x i8> @llvm.mips.shf.b(<16 x i8> %0, i32 25)
147 declare <16 x i8> @llvm.mips.shf.b(<16 x i8>, i32) nounwind
151 ; CHECK: shf.b
161 %1 = tail call <8 x i16> @llvm.mips.shf.h(<8 x i16> %0, i32 25)
166 declare <8 x i16> @llvm.mips.shf.h(<8 x i16>, i32) nounwind
170 ; CHECK: shf.h
180 %1 = tail call <4 x i32> @llvm.mips.shf.w(<4 x i32> %0, i32 25)
185 declare <4 x i32> @llvm.mips.shf.w(<4 x i32>, i32) nounwind
189 ; CHECK: shf.w
Dbitcast.ll50 ; BIGENDIAN: shf.b [[R3:\$w[0-9]+]], [[R2]], 177
98 ; BIGENDIAN: shf.b [[R3:\$w[0-9]+]], [[R2]], 27
123 ; BIGENDIAN: shf.b [[R3:\$w[0-9]+]], [[R2]], 27
148 ; BIGENDIAN: shf.b [[R3:\$w[0-9]+]], [[R2]], 27
149 ; BIGENDIAN: shf.w [[R3:\$w[0-9]+]], [[R3]], 177
174 ; BIGENDIAN: shf.b [[R3:\$w[0-9]+]], [[R2]], 27
175 ; BIGENDIAN: shf.w [[R3:\$w[0-9]+]], [[R3]], 177
200 ; BIGENDIAN: shf.b [[R3:\$w[0-9]+]], [[R2]], 177
272 ; BIGENDIAN: shf.h [[R3:\$w[0-9]+]], [[R2]], 177
297 ; BIGENDIAN: shf.h [[R3:\$w[0-9]+]], [[R2]], 177
[all …]
Dshuffle.ll165 ; CHECK-DAG: shf.w [[R3:\$w[0-9]+]], [[R1]], 27
192 ; CHECK-DAG: shf.w [[R3:\$w[0-9]+]], [[R2]], 36
314 ; CHECK-DAG: shf.b [[R3:\$w[0-9]+]], [[R1]], 45
327 ; CHECK-DAG: shf.h [[R3:\$w[0-9]+]], [[R1]], 27
340 ; CHECK-DAG: shf.w [[R3:\$w[0-9]+]], [[R1]], 27
347 ; shf.d does not exist
/external/llvm/lib/Target/Mips/
DMSA.txt24 constant since shf.w covers exactly the same cases. shf.w is used
48 It is not possible to emit splati.w since shf.w covers the same cases.
49 shf.w will be emitted instead.
/external/mksh/
DAndroid.mk30 src/lex.c src/main.c src/misc.c src/shf.c \
/external/apache-commons-math/src/main/java/org/apache/commons/math/dfp/
DDfp.java1981 int shf; in dfp2sci() local
1998 shf = p; in dfp2sci()
2027 e = exp * 4 - shf - 1; in dfp2sci()
/external/llvm/lib/Target/NVPTX/
DNVPTXInstrInfo.td1057 // Rotate: Use ptx shf instruction if available.
1062 // r2 = shf.l r1, r1, n
1065 "shf.l.wrap.b32 \t$dst, $src, $src, $amt;",
1071 "shf.l.wrap.b32 \t$dst, $src, $src, $amt;",
1077 // r2 = shf.r r1, r1, n
1080 "shf.r.wrap.b32 \t$dst, $src, $src, $amt;",
1086 "shf.r.wrap.b32 \t$dst, $src, $src, $amt;",
1208 "shf.l.clamp.b32 \t$dst, $lo, $hi, $amt;",
1215 "shf.r.clamp.b32 \t$dst, $lo, $hi, $amt;",
/external/valgrind/VEX/priv/
Dguest_arm64_toIR.c9191 IRTemp shf = newTempV128(); in dis_AdvSIMD_scalar_shift_by_imm() local
9194 assign(shf, mkV128(0x0000)); in dis_AdvSIMD_scalar_shift_by_imm()
9201 assign(shf, binop(op, src, mkU8(sh - nudge))); in dis_AdvSIMD_scalar_shift_by_imm()
9203 assign(res, isAcc ? binop(Iop_Add64x2, getQReg128(dd), mkexpr(shf)) in dis_AdvSIMD_scalar_shift_by_imm()
9204 : mkexpr(shf)); in dis_AdvSIMD_scalar_shift_by_imm()
9228 IRTemp shf = newTempV128(); in dis_AdvSIMD_scalar_shift_by_imm() local
9230 assign(shf, binop(op, src, amt)); in dis_AdvSIMD_scalar_shift_by_imm()
9231 assign(res, isAcc ? binop(Iop_Add64x2, getQReg128(dd), mkexpr(shf)) in dis_AdvSIMD_scalar_shift_by_imm()
9232 : mkexpr(shf)); in dis_AdvSIMD_scalar_shift_by_imm()
10387 IRTemp shf = newTempV128(); in dis_AdvSIMD_shift_by_immediate() local
[all …]
/external/llvm/test/Transforms/InstCombine/
Dicmp.ll1638 %shf = lshr i32 %x, %y
1639 %or = or i32 %shf, %x
1651 %shf = lshr i32 %x, 1
1652 %or = or i32 %shf, %x

12