Displaying 10 results from an estimated 10 matches for "jmploc".
2020 Mar 28
0
[klibc:update-dash] dash: eval: Reset handler when entering a subshell
...eset_handler();
FORCEINTON;
close(pip[0]);
if (pip[1] != 1) {
diff --git a/usr/dash/main.c b/usr/dash/main.c
index 6b3a0909..b2712cbd 100644
--- a/usr/dash/main.c
+++ b/usr/dash/main.c
@@ -71,6 +71,7 @@ int *dash_errno;
short profile_buf[16384];
extern int etext();
#endif
+static struct jmploc main_handler;
STATIC void read_profile(const char *);
STATIC char *find_dot_file(char *);
@@ -90,7 +91,6 @@ main(int argc, char **argv)
{
char *shinit;
volatile int state;
- struct jmploc jmploc;
struct stackmark smark;
int login;
@@ -102,7 +102,7 @@ main(int argc, char **argv)
mon...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Do not allow break to break across function calls
...adent.org.uk>
---
usr/dash/eval.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index ccd5e0c0..204f1e57 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -928,9 +928,11 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags)
struct jmploc jmploc;
int e;
int savefuncline;
+ int saveloopnest;
saveparam = shellparam;
savefuncline = funcline;
+ saveloopnest = loopnest;
savehandler = handler;
if ((e = setjmp(jmploc.loc))) {
goto funcdone;
@@ -940,6 +942,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Do not allow break to break across function calls
...adent.org.uk>
---
usr/dash/eval.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 1c76d4c5..e0c21f94 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -928,9 +928,11 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags)
struct jmploc jmploc;
int e;
int savefuncline;
+ int saveloopnest;
saveparam = shellparam;
savefuncline = funcline;
+ saveloopnest = loopnest;
savehandler = handler;
if ((e = setjmp(jmploc.loc))) {
goto funcdone;
@@ -940,6 +942,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags...
2016 Apr 15
3
[Sparc] Load address with SETHI
Hi,
I'm trying to implement __builtin_setjmp / __builtin_longjmp for Sparc processors. I think I'm very close, but I can't work out how to issue BuildMI-type instructions to load the address of the recovery location (set in setjmp) into a register using the SETHI / OR combination. I can't see any equivalent code anywhere else in Sparc.
I imagine this is similar if I try to make a
2016 Apr 27
2
[Sparc] builtin setjmp / longjmp - need help to get past last problem
...MachineInstr::mmo_iterator MMOEnd = MI->memoperands_end();
+
+ MVT PVT = getPointerTy(MF->getDataLayout());
+ unsigned PtrSize = PVT.getStoreSize();
+ assert(PVT == MVT::i32 && "Invalid Pointer Size!");
+
+ unsigned Buf = MI->getOperand(0).getReg();
+ unsigned JmpLoc = MRI.createVirtualRegister(&SP::IntRegsRegClass);
+
+ // Instruction to load jmp location
+ MIB = BuildMI(*MBB, MI, DL, TII->get(SP::LDri))
+ .addReg(JmpLoc, RegState::Define)
+ .addReg(Buf)
+ .addImm(PtrSize);
+ MIB.setMemRefs(MMOBegin, MMOEnd);
+...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Exit without arguments in a trap should use status outside traps
...itstatus;
+ savestatus = status;
+ }
pendingsigs = 0;
barrier();
@@ -337,8 +342,10 @@ void dotrap(void)
if (!p)
continue;
evalstring(p, 0);
- exitstatus = savestatus;
+ exitstatus = status;
}
+
+ savestatus = last_status;
}
@@ -372,18 +379,14 @@ exitshell(void)
{
struct jmploc loc;
char *p;
- volatile int status;
#ifdef HETIO
hetio_reset_term();
#endif
- status = exitstatus;
- TRACE(("pid %d, exitshell(%d)\n", getpid(), status));
- if (setjmp(loc.loc)) {
- if (exception == EXEXIT)
- status = exitstatus;
+ savestatus = exitstatus;
+ TRACE(("pid %...
[klibc:update-dash] dash: [BUILTIN] Exit without arguments in a trap should use status outside traps
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Exit without arguments in a trap should use status outside traps
...itstatus;
+ savestatus = status;
+ }
pendingsigs = 0;
barrier();
@@ -337,8 +342,10 @@ void dotrap(void)
if (!p)
continue;
evalstring(p, 0);
- exitstatus = savestatus;
+ exitstatus = status;
}
+
+ savestatus = last_status;
}
@@ -372,18 +379,14 @@ exitshell(void)
{
struct jmploc loc;
char *p;
- volatile int status;
#ifdef HETIO
hetio_reset_term();
#endif
- status = exitstatus;
- TRACE(("pid %d, exitshell(%d)\n", getpid(), status));
- if (setjmp(loc.loc)) {
- if (exception == EXEXIT)
- status = exitstatus;
+ savestatus = exitstatus;
+ TRACE(("pid %...
2010 Oct 19
3
[PATCH] Fix up 3 klibc build warnings.
..., 32, "%s", strsignal(st));
if (WCOREDUMP(status)) {
col += fmtstr(s + col, 16, " (core dumped)");
}
diff --git a/usr/dash/trap.c b/usr/dash/trap.c
index 18c3cd1..d6706c6 100644
--- a/usr/dash/trap.c
+++ b/usr/dash/trap.c
@@ -351,7 +351,7 @@ exitshell(void)
{
struct jmploc loc;
char *p;
- int status;
+ volatile int status;
#ifdef HETIO
hetio_reset_term();
--
1.7.1
2019 Jan 25
0
[klibc:update-dash] input: Remove HETIO
...rap.h"
#include "mystring.h"
-#ifdef HETIO
-#include "hetio.h"
-#endif
-
/*
* Sigmode records the current value of the signal handlers for the various
* modes. A value of zero means that the current handler is not known.
@@ -381,9 +377,6 @@ exitshell(void)
struct jmploc loc;
char *p;
-#ifdef HETIO
- hetio_reset_term();
-#endif
savestatus = exitstatus;
TRACE(("pid %d, exitshell(%d)\n", getpid(), savestatus));
if (setjmp(loc.loc))
2020 Mar 28
0
[klibc:update-dash] dash: input: Remove HETIO
...rap.h"
#include "mystring.h"
-#ifdef HETIO
-#include "hetio.h"
-#endif
-
/*
* Sigmode records the current value of the signal handlers for the various
* modes. A value of zero means that the current handler is not known.
@@ -381,9 +377,6 @@ exitshell(void)
struct jmploc loc;
char *p;
-#ifdef HETIO
- hetio_reset_term();
-#endif
savestatus = exitstatus;
TRACE(("pid %d, exitshell(%d)\n", getpid(), savestatus));
if (setjmp(loc.loc))