* cris/sim-main.h (struct _sim_cpu): New member
[deliverable/binutils-gdb.git] / sim / cris / traps.c
index 081273fac78541215ac18c4d8b9a428dc5d89ab4..aa3b90afefbce4fd922ea07eb73bff43e26197bc 100644 (file)
@@ -113,6 +113,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define TARGET_SYS_getegid32 202
 #define TARGET_SYS_getgid32 200
 #define TARGET_SYS_fcntl64 221
+#define TARGET_SYS_set_thread_area 243
 #define TARGET_SYS_exit_group 252
 
 #define TARGET_PROT_READ       0x1
@@ -3154,6 +3155,17 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
          retval = -cb_host_to_target_errno (cb, ENOSYS);
          break;
 
+       case TARGET_SYS_set_thread_area:
+         /* Do the same error check as Linux.  */
+         if (arg1 & 255)
+           {
+             retval = -cb_host_to_target_errno (cb, EINVAL);
+             break;
+           }
+         (*current_cpu->set_target_thread_data) (current_cpu, arg1);
+         retval = 0;
+         break;
+
        unimplemented_syscall:
        default:
          retval
This page took 0.023235 seconds and 4 git commands to generate.