Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1938)

Unified Diff: src/trusted/platform_qualify/arch/mips/nacl_dep_qualify_arch.c

Issue 18861003: [MIPS] Remove NaClCheckDEP for MIPS (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/trusted/platform_qualify/build.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/platform_qualify/arch/mips/nacl_dep_qualify_arch.c
diff --git a/src/trusted/platform_qualify/arch/mips/nacl_dep_qualify_arch.c b/src/trusted/platform_qualify/arch/mips/nacl_dep_qualify_arch.c
deleted file mode 100644
index 65b1d65620e59b5191e4c40439e6cc19295ba4c7..0000000000000000000000000000000000000000
--- a/src/trusted/platform_qualify/arch/mips/nacl_dep_qualify_arch.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2012 The Native Client Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can
- * be found in the LICENSE file.
- */
-
-#include <stddef.h>
-#include <stdint.h>
-#include "native_client/src/trusted/platform_qualify/nacl_dep_qualify.h"
-#include "native_client/src/include/nacl_macros.h"
-
-/* Assembled equivalent of "jr ra" */
-#define INST_JR_RA 0x3E00008
-#define INST_NOP 0x0000000
-
-int NaClCheckDEP(void) {
- /*
- * We require DEP, so forward this call to the OS-specific check routine.
- */
- return NaClAttemptToExecuteData();
-}
-
-nacl_void_thunk NaClGenerateThunk(char *buf, size_t size_in_bytes) {
- /*
- * Place a "jr ra" at the next aligned address after buf. Instructions
- * are always little-endian, regardless of data setting. We also place opcode
- * for "nop" (which is zero) because of delay slot in Mips.
- */
- uint32_t *aligned_buf = (uint32_t *) (((uintptr_t) buf + 3) & ~3);
-
- if ((char*) aligned_buf + 8 > buf + size_in_bytes) return 0;
-
- aligned_buf[0] = (uint32_t) INST_JR_RA;
- aligned_buf[1] = (uint32_t) INST_NOP;
-
- /*
- * ISO C prevents a direct data->function cast, because the pointers aren't
- * guaranteed to be the same size. For our platforms this is fine, but we
- * verify at compile time anyway before tricking the compiler:
- */
- NACL_ASSERT_SAME_SIZE(char *, nacl_void_thunk);
- return (nacl_void_thunk) (uintptr_t) aligned_buf;
-}
« no previous file with comments | « no previous file | src/trusted/platform_qualify/build.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698