Comments (10)
Unfortunately, the ARM-related implementation of zpl_rdtsc
is very flawed due to a lack of expertise in that particular architecture. I agree a refinement should be made to improve and better handle special conditions.
from zpl.
To me, the ARMv6-upward implementation seems perfectly fine to use on ARMv7 as well, but I assume there was an intention behind the special case for __ARM_ARCH_7A__
? (And I furthermore assume that all code present in the codebase was actually executed at least once and found working, so that there exists at least one system on which the code in question ran through.)
@inlife, you probably had something in mind when you wrote it in commit 2a6e301?
from zpl.
Hey @helixhorned
Unfortunately, I can't say I remember any details about this specific macro sequence.
but then the preprocessor condition needs to be refined IMO.
I fully support the refinement, I assume you already have a great suggestion in mind?
from zpl.
I don't have a great suggestion but a humble one which I thought you might not like: namely removing the code under #elif defined(__ARM_ARCH_7A__)
altogether. Now up in PR #46.
Maybe in the future, the original intention becomes apparent again (for example, maybe there is a variant of the Arm architecture that simply doesn't have access checks and selecting that architecture was the intent?) and then the code in question can be brought back again. In my opinion that's better than aborting with SIGILL
. You decide, of course :).
from zpl.
Ok, I think that sounds quite reasonable š
Thank you!
from zpl.
Changes are now present in version 10.8.6. Should we close this issue?
from zpl.
Changes are now present in version 10.8.6. Should we close this issue?
Cool with me! š
from zpl.
Thanks for the contribution, I really appreciate it!
from zpl.
You're welcome!
Just a follow-up: I saw commit e426c2f which moved the status on the Raspberry Pi from 'ā' to 'ā '.
I did not mean to imply that I had exercised the functionality offered by ZPL in its
entirety. In fact, I did not get the tests to build. After all, there still seem to be a few
corners that are unimplemented on ARM:
$ make code/tests/tester
=> Building tester
In file included from code/zpl.h:717,
from code/tests/tester.c:2:
code/source/threading/atomic.c:344:6: error: #error TODO: Implement Atomics for this CPU
#error TODO: Implement Atomics for this CPU
^~~~~
In file included from code/zpl.h:718,
from code/tests/tester.c:2:
code/source/threading/fence.c: In function āzpl_yield_threadā:
code/source/threading/fence.c:37:10: error: #error Unknown architecture
#error Unknown architecture
^~~~~
(^ Same for āzpl_mfenceā, āzpl_sfenceā and āzpl_lfenceā.)
code/source/threading/thread.c: In function āzpl_thread_current_idā:
code/source/threading/thread.c:111:10: error: #error Unsupported architecture for zpl_thread_current_id()
#error Unsupported architecture for zpl_thread_current_id()
^~~~~
make: *** [Makefile:59: code/tests/tester] Error 1
from zpl.
Ah, I assumed the mentioned previously issue was the only thing that was supported on Raspberry Pi. And since it got resolved it seemed a good idea to mark it as is.
@helixhorned would you like to introduce the improvements to the Raspberry Pi side of things?
from zpl.
Related Issues (20)
- zpl_adt_node returned by zpl_json_parse() could have more useful parents HOT 4
- zpl_opts module should make use of ADT parser to process input HOT 1
- ADT URL parser addition
- Off-by-one in zpl_json_write_string/zpl_csv_write_string_delimiter HOT 1
- Result of zpl_alloc() is often not checked HOT 16
- Completion of error handling HOT 4
- zpl_array_fill ZPL_ASSERT error HOT 1
- zpl_opts_load_adt: allows the ability to load ADT node to fulfill CLI options
- ADT parsing of 'x' results in a ZPL_ADT_TYPE_INTEGER HOT 4
- `zpl_file_open` and functions that call it do not error when passed a directory HOT 5
- `name` and `string` fields of `zpl_json_object` have garbage values for `$schema` key HOT 6
- zpl_thread join/is_running
- Unicode support HOT 2
- pthread_join must be called for PTHREAD_CREATE_JOINABLE thread
- add 'zpl_semaphore_trywait'
- Undecorated 'cast' macro in helpers.h HOT 1
- Provide a way to free memory with the provided size HOT 5
- Global-buffer-overflow in zpl_strlcpyĀ Ā in base64_enc HOT 2
- CSV parser assumes (unquoted) IP addresses are floating point HOT 3
- zpl_random_gen_isize / zpl_random_range_isize are not 32bit safe HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zpl.