diff options
author | Bryan Mawhinney <bryanmawhinney@google.com> | 2010-11-11 14:33:12 +0000 |
---|---|---|
committer | Bryan Mawhinney <bryanmawhinney@google.com> | 2010-11-15 17:43:12 +0000 |
commit | c0aaccc485a78353eba5fbe4f392c389859b1c17 (patch) | |
tree | 1a8a4a887705c0f3e129f0583ee02158cf2fd6ec /libs/rs | |
parent | e70e78103a843947ff79ec4c963377e84b2da100 (diff) | |
download | frameworks_base-c0aaccc485a78353eba5fbe4f392c389859b1c17.zip frameworks_base-c0aaccc485a78353eba5fbe4f392c389859b1c17.tar.gz frameworks_base-c0aaccc485a78353eba5fbe4f392c389859b1c17.tar.bz2 |
Add support for integer mod.
Change-Id: I681b8220c8b39d865ade036a93ba93a965e259c9
Diffstat (limited to 'libs/rs')
-rw-r--r-- | libs/rs/rsScriptC_Lib.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index ab8d9d7..7e4a247 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -345,6 +345,10 @@ int SC_divsi3(int a, int b) { return a / b; } +int SC_modsi3(int a, int b) { + return a % b; +} + int SC_getAllocation(const void *ptr) { GET_TLS(); const Allocation *alloc = sc->ptrToAllocation(ptr); @@ -402,6 +406,7 @@ void SC_ForEach2(RsScript vs, static ScriptCState::SymbolTable_t gSyms[] = { { "__divsi3", (void *)&SC_divsi3, true }, + { "__modsi3", (void *)&SC_modsi3, true }, // allocation { "_Z19rsAllocationGetDimX13rs_allocation", (void *)&SC_allocGetDimX, true }, @@ -528,4 +533,3 @@ const ScriptCState::SymbolTable_t * ScriptCState::lookupSymbol(const char *sym) } return NULL; } - |