Open OttyLab opened 6 years ago
Currently, x86 library includes TEXTREL entry in it. From Android API23, TEXTREL is prohibited and crash happens.
To fix this issue, there's 3 approaches
I'll try 1. first.
sha2-x86.S includes .data
like this;
.data
.p2align 7
sha256_4h:
.long 0x6a09e667, 0x6a09e667, 0x6a09e667, 0x6a09e667
.long 0xbb67ae85, 0xbb67ae85, 0xbb67ae85, 0xbb67ae85
.long 0x3c6ef372, 0x3c6ef372, 0x3c6ef372, 0x3c6ef372
.long 0xa54ff53a, 0xa54ff53a, 0xa54ff53a, 0xa54ff53a
.long 0x510e527f, 0x510e527f, 0x510e527f, 0x510e527f
.long 0x9b05688c, 0x9b05688c, 0x9b05688c, 0x9b05688c
.long 0x1f83d9ab, 0x1f83d9ab, 0x1f83d9ab, 0x1f83d9ab
.long 0x5be0cd19, 0x5be0cd19, 0x5be0cd19, 0x5be0cd19
Accessing .data
code will produce TEXTREL and Android OS refuses to load.
As a fix, I propose that pushing all data into stack on the exposed function call, then popping all data on return.
@cryptozeny
master branch merges a workaround for x86. If you have time, could you try it ? (git submodule deinit is required, I suppose)
In this workaround, sha2-x86.S is not used (approach 2.). yescrypt does not use this, so there's no performance impact on bitzeny mining.
Fixing the assembly code would take much time. When I have time, I'll try.
great! i will try it sooner. now i am upgradig cpuminer yescrypt0.5 to yesPower0.5. it boosts hashrate about 3~10%. could you update the cpuminer after its upgrading? 😅
@cryptozeny
Of course. Which code base can I use?
(At least, I need to change the code base from https://github.com/bitzeny/cpuminer to https://github.com/BitzenyCoreDevelopers/cpuminer 😄 )
@cryptozeny
I've updated the assembly code and master branch fixes the x86 issue. If you find some issue, please let me know.
(I must admit that the assembly code is not efficient because it needs to push some values to the stack and it would affect performance.)
sorry for late answer 😅 now i am working on cpuminer-yesPower and its almost done. it boosts 2~10% hash. currently it based on macchky's one. i think its not so far from yours. can it be merged into this app?
sadly new yespower doesn't support 32bit arv7l (no neon arm), however the dev of yespower said it will be supported next release. also my cpuminer support both of yespower and old yescrypt.
https://gist.github.com/cryptozeny/a249d37066fd84b15b3dc1273558520e
and it supports also another coin such as yenten, koto, wavi using yescrypt.